Custom FirstDayOfWeek

2 posts, 0 answers
  1. Dan
    Dan avatar
    2 posts
    Member since:
    Jan 2012

    Posted 21 Feb 2012 Link to this post

    Hi, i am using radscheduleview with ms lightswitch ( and i need to set the FirstDayOfWeek to be today. Is that possible? For now i am having FirstDayOfWeek="Monday".

    <telerik:WeekViewDefinition DayStartTime="09:00:00"  EnableSmallAppointmentRendering="True"
                                              TimerulerMajorTickStringFormat="{}{0:h tt}:{0:mm} "

    Thank you
  2. Ivo
    Ivo avatar
    390 posts

    Posted 23 Feb 2012 Link to this post


    You will have to set the WeekViewDefinition FirsyDayOfWeek in code behind. This could be done into the RadScheduleView UserControl constructor. Here is sample code:
    public RadScheduleViewControl()
        var viewDefinitions = this.xScheduleView.ViewDefinitions;
        foreach (var viewDefinition in viewDefinitions)
            if (viewDefinition is WeekViewDefinition)
                viewDefinition.FirstDayOfWeek = DateTime.Today.DayOfWeek;

        xScheduleView.Loaded += new RoutedEventHandler(xScheduleView_Loaded);

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top