Open justinperkins opened 1 year ago
Hi @justinperkins
Did you manage to get this working? 🤔
Did you manage to get this working? 🤔
I did actually, through looking at the Flowbite datepicker source code I found that a custom event is emitted on the related input control, so you can use that to trigger custom code when a date is chosen.
Basically, if you observe for the changeDate
event on your input, it will be fired when a date is chosen in the Flowbite datapicker UI.
Related Flowvite JS here: https://github.com/themesberg/flowbite-datepicker/blob/658b8cc5b84aec732e60f59044b35d4769c00294/js/Datepicker.js#L110 And here: https://github.com/themesberg/flowbite-datepicker/blob/master/js/events/functions.js#L4
Currently when the date value is assigned, no change event is fired, which means that when you've got custom event listeners for
change
events, they won't fire when a date in the picker is chosen.