ctrachte / Datepicker.js

Simple standalone date picker with only html, css and moment.js
https://www.npmjs.com/package/moment-datepicker-js
MIT License
4 stars 7 forks source link

Cancel/Clear Functionality Issue #132

Closed andrewdeclue closed 3 years ago

andrewdeclue commented 3 years ago

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.