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

Getting scheduler options and triggering business day display change

3 Answers 216 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Grant asked on 27 Mar 2018, 08:16 AM

Hi, 

So as my title says, Im trying to extract some options from the scheduler widget, namely the 'workDayStart' and 'workDayEnd' date/times. The reason being is that if an existing appointment is outside the work times, I'd like to auto display the full day instead of just working hours.
Which brings me to the next issue, is there a way to programmatically change the 'showWorkHours' config?

Thanks and kind regards,
Grant

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 29 Mar 2018, 06:43 AM
Hi Grant,

See the following dojo example, which demonstrates how to access the workDayStart and workDayEnd values (they are logged in the console on clicking the button placed above the Scheduler), as well as how to set the showWorkHours option by calling the Scheduler's setOptions API method and then refreshing the view with the view method.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
answered on 04 Apr 2018, 06:46 AM

Morning Ivan, 

Thanks for the response. It does however brig up another issue though. You're able to retrieve the workDayStart & workDayEnd values from the options because you explicitly set them. The scheduler's default workDaystart and end are 8am & 5pm respectively. Is it possible to retrive them without explicitly setting them and just rely on the default values?

Thanks,
Grant

0
Ivan Danchev
Telerik team
answered on 06 Apr 2018, 06:47 AM
Hi Grant,

If the Scheduler's workDayStart and workDayEnd options are not set explicitly you can't get the Scheduler option values, but can get the view's workDayStart and workDayEnd values: updated dojo example.

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Grant
Top achievements
Rank 3
Iron
Iron
Veteran
Share this question
or