Get Start/End_date from Lightbox before built-in validation

Hello,

i need some help with the built-in validation of the dates.

If end_date is less or equal to start_date, end_date will be automaticly set to <start_date + DHXScheduler.Config.time_step>. My problem is, that i dont want this behavior. I want to call an alert message, so the user can set a new time before the scheduler send this event to the server.

For this reason i need a validation of start_date and end_date with the original values of the Lightbox. Is there any chance to get them before the automatic validation? Or a event handler to detect the “automatic validation”?

Best whishes and thank you very much,
Nano

Hello,

You can make validation of dates before saving changes using onEventSave event. To get dates which were before opening the lightbox use onBeforeLightbox event.
docs.dhtmlx.com/scheduler/api__s … event.html
docs.dhtmlx.com/scheduler/api__s … event.html

Thank you, but how can i get the original values of users input?

In the “onSave” Function I only can get the dates aufter the built-in validation, not the user input!

Hello,

Unfortunately there is no other biult-in ways.
Perhaps ‘object.onchange’ can help you solve the issue.
w3schools.com/jsref/event_onchange.asp