vbsix
#1
Hi,
I am currently using dhtmlx mobile scheduler.
Is there a way to have the end date/time automatically update to 1 hr after the start date when the start date is set or changed?
My apologies if this has already been answered, I looked but couldn’t find it.
Thanks in advance,
Curtis
Hello,
you can try to use onChange event handler for “start_date”. For example the handler can be like so:
$$("scheduler").$$("start_date").attachEvent("onChange",function(){
var startDate = this.getValue();
var endDate = $$("scheduler").$$("end_date").getValue();
if(startDate&&endDate&&startDate.valueOf()>=endDate.valueOf())
$$("scheduler").$$("end_date").setValue(dhx.Date.add(startDate,1,"hour"));
});