Recently i'm using kendo scheduler in my project. from there i'm using event adding. By default when we are picking time from scheduler, it will automatically set start time and end time. The difference between start and end time is always 30 min. Example image is given here
According to my requirement i want to change this difference to 1 hour.
I am not able to set this difference. Please help.
I hope i get your point correctly so, this is how you do it.
Here is the edit function code :
edit: function(e){
if(e.event.isNew){
var start = e.container.find("[name=start][data-role=datetimepicker]");
var end = e.container.find("[name=end][data-role=datetimepicker]");
var startTime = new Date(e.event.start);
var endTime = new Date(startTime);
endTime.setHours(startTime.getHours() + 1);
$(start).data("kendoDateTimePicker").value(startTime); //set start date to the current date and time
$(end).data("kendoDateTimePicker").value(endTime); //set enddate to the current date and time
//this line needed, since the event time is still only 30 minutes. if you remove this, upon saving if you didnt touch the datetimepicker (leave as it) then it will save only 30 minutes while it showing 1 hour
e.event.end = endTime;
}
Here is working example