This is a migrated thread and some comments may be shown as answers.

Different work times for each day

1 Answer 32 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gavin
Top achievements
Rank 1
Gavin asked on 04 Sep 2012, 06:05 AM

Hi,

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?

Thanks

Gavin.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 Sep 2012, 06:12 AM
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);
       }
       else
       {
           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,
Plamen
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.
Tags
Scheduler
Asked by
Gavin
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or