Getting scheduler options and triggering business day display change

4 posts, 0 answers
  1. Grant
    Grant avatar
    163 posts
    Member since:
    Jul 2016

    Posted 27 Mar 2018 Link to this post

    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

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2062 posts

    Posted 29 Mar 2018 Link to this post

    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.
  3. Grant
    Grant avatar
    163 posts
    Member since:
    Jul 2016

    Posted 04 Apr 2018 Link to this post

    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

  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2062 posts

    Posted 06 Apr 2018 Link to this post

    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.
Back to Top