flowbite
flowbite copied to clipboard
reinit Datepicker
I have an issue, but I'm not certain if it is a bug or a feature.
I'm trying to use a datepicker input inside a table, and I need to add more rows to the table through a button. However, since this new row doesn't exist in the DOM yet, because it's being created with a template, and the script from Flowbite has already run, the component of Datepicker isn't generated in the new field.
So, I tried to use initFlowbite(); to reload the Datepicker component without success.
I was wondering if there is any other way to do that or if there is something like an initModal() or initDropdown() function that I can use.
I'm not using any framework, just pure html and js combined with Flowbite(1.7.0).
To reproduce the behavior:
- Add a datepicker field after the js from Flowbite had already run.
- There is no way to generate the component for the calendar.
1-Before the fields were created
2-After the fields were created
3-Calendar wasn't generated
- Browser [e.g. chrome, edge]
- Version [e.g. 22]