Currently I am using the onClose() function to run code, which gets run when using the clear/cancel button at the bottom left of the datepicker. When it fires after clearing the dates, the function inside breaks due to the dates being removed from the datepicker just prior to the onClose function running.
Possible solutions:
Giving the option of making the clear button function the same as the close button, leaving dates intact.
Giving the option of an onClear() function that runs when the clear button is activated.
Doing it better, someone else already figured it out. /s (edit, added /s)
Giving the option of hiding the clear button entirely so that hitting it isn't an option.
I think we need the option for both the occasional ability to clear the dates, and most of the time for the modal to just close without clearing anything.
Currently I am using the onClose() function to run code, which gets run when using the clear/cancel button at the bottom left of the datepicker. When it fires after clearing the dates, the function inside breaks due to the dates being removed from the datepicker just prior to the onClose function running.
Possible solutions:
I think we need the option for both the occasional ability to clear the dates, and most of the time for the modal to just close without clearing anything.