Different work times for each day

2 posts, 0 answers
  1. Gavin
    Gavin avatar
    31 posts
    Member since:
    Sep 2012

    Posted 04 Sep 2012 Link to this post


    I need to set the work time/business hours in the scheduler based on the day of the week, eg. Mon-Fri 9am-5pm Sat 10am-1pm.

    I can see where I can set it for the whole block but not based on an individual day.  Is there a server side event that I can do this on?



  2. Plamen
    Plamen avatar
    2958 posts

    Posted 06 Sep 2012 Link to this post

    Hello Gavin,

    In DayView you can use onNavigationComplete event as in the code below:

    protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
           if (RadScheduler1.SelectedDate.DayOfWeek==DayOfWeek.Saturday||RadScheduler1.SelectedDate.DayOfWeek==DayOfWeek.Sunday)
               RadScheduler1.DayStartTime = TimeSpan.FromHours(10);
               RadScheduler1.DayEndTime = TimeSpan.FromHours(13);
               RadScheduler1.DayStartTime = TimeSpan.FromHours(9);
               RadScheduler1.DayEndTime = TimeSpan.FromHours(17);

    In WeekView such scenario is not supported by RadScheduler but one possible workaround is to disable the slots that as not "working" as it is shown in this KB so they are not used.
     All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top