Different FirstDayOfWeek in week/month views?

3 posts, 1 answers
  1. Rob Teegarden
    Rob Teegarden avatar
    25 posts
    Member since:
    Feb 2008

    Posted 18 Mar 2008 Link to this post

    Is it possible to have different values for FirstDayOfWeek for the week view and month view?  I would like to show a 5 day work week in the week view, but in the month view it looks strange to have the weekends missing, so I want to show all days there.

    TIA
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 19 Mar 2008 Link to this post

    Hello Rob,

    Yes, this is possible by setting the FirstDayOfWeek and LastDayOfWeek properties in the NavigationCommand event:

     protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)  
        {  
            if (e.Command == SchedulerNavigationCommand.SwitchToMonthView)  
            {  
                RadScheduler1.FirstDayOfWeek = DayOfWeek.Sunday;  
                RadScheduler1.LastDayOfWeek = DayOfWeek.Saturday;  
            }  
            else 
            {  
                RadScheduler1.FirstDayOfWeek = DayOfWeek.Monday;  
                RadScheduler1.LastDayOfWeek = DayOfWeek.Friday;          
            }  
        } 


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rob Teegarden
    Rob Teegarden avatar
    25 posts
    Member since:
    Feb 2008

    Posted 19 Mar 2008 Link to this post

    That works perfect!
Back to Top