Hi,
as I understand you need some validation rules to check or set event duration.
You can use “onEventSave” (changes made via lightbox), “onBeforeEventChanged” (changes made by drag’n’drop) events to check it or reset/set some new values. docs.dhtmlx.com/scheduler/api__r … vents.html
I´m doing a check with the ‘OnEventSave’ event. So, when the lightbox is going to be saved, my function is fired. I compare the values of the dates, but the one I need is the end date value selected in the lightbox and I don´t know how to get this value
data from the lightbox (including start/end date from time selectors);
“is_new” as “true” for the new event.
To get “old” properties (start/end dates) of the event use:
scheduler.attachEvent("onEventSave",function(id, data, is_new) {
var old_ev = scheduler.getEvent(id); // you can get old start/end date
var old_start = old_ev.start_date;
var new_start = data.start_date;
return true;
});