flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

reinit Datepicker

Open Eduardo-XavierPaula opened this issue 1 year ago • 0 comments

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:

  1. Add a datepicker field after the js from Flowbite had already run.
  2. There is no way to generate the component for the calendar.

1-Before the fields were created image 2-After the fields were created image 3-Calendar wasn't generated image

  • Browser [e.g. chrome, edge]
  • Version [e.g. 22]

Eduardo-XavierPaula avatar Jul 05 '23 19:07 Eduardo-XavierPaula