Hello, How to avoid selecting more than one date?
The users can only create a single day event.
Hello,
do you mean remove second date selector from the lightbox? If so, the only way to do so is hide unneeded selectors via display:none. For example, remove end date selectors completely: scheduler.attachEvent("onLightbox", function(){
var node = scheduler.formSection("time").node;
var sels = node.getElementsByTagName("select");
var start = sels.length - 4;//'end_date' inputs
sels[start].previousSibling.style.display='none';//hide 'dash'
for (var i=start; i<sels.length; i++)
sels[i].style.display="none";//hide selects
});
If you mean more general validation for event durations, you can use onEventSave and onBeforeEventChanged events. They allows checking event state and altering or preventing changes when necessary
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … event.html