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

Kendo scheduler change start time when the date changes in navigation bar

1 Answer 324 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Shajina
Top achievements
Rank 1
Shajina asked on 05 May 2017, 02:16 AM

Hello,

I am using kendo scheduler in my project.  I am using time line view and we have a requirement where I have to set the start time of the scheduler as 12:00 PM on page load.  When I navigate to the next date the time line should start from 12:00AM again and not 12:00PM. Currently once I set the start time, all other days also start with the same start time.

Kindly suggest how can I achieve the same.



Thanks & Regards

Shajina

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 09 May 2017, 09:41 AM
Hello Shajina,

To achieve the desired dynamic change of the startTime of the Scheduler, you will need to destroy the widget and recreate it with the desired options. You could implement that logic in its navigate event:
navigate: function(e) {
  var scheduler = e.sender;
  var startTime = scheduler.options.startTime;
   
  if (startTime.getHours() === 12) {
    e.preventDefault();
     
    var options = scheduler.options;
    scheduler.destroy();
    options.startTime = new Date("2013/6/13 12:00 AM");
    options.date = e.date;
    $("#scheduler").empty().kendoScheduler(options);
  }
},

Here you will find a small Dojo sample, implementing the above.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 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
Shajina
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or