TRICKY VALIDATION

i have an employee who will b on leave from date A to date B.how do i validate that a task allocated to him on date C, isn’t allocated wen he is on leave?ie not between A and B

Hi,
you can use onBeforeEventChanged and onEventSave events. In handlers code you’ll need to check task’s start/end_date and cancel action if it’s necessary
dates validation might look like following function isValidDuration(event, A, B){ return !(event.start_date.valueOf() < B.valueOf() && event.end_date.valueOf() > A.valueOf()) }
Related docs:
docs.dhtmlx.com/doku.php?id=dhtm … entchanged
docs.dhtmlx.com/doku.php?id=dhtm … neventsave