blade-ui-kit
blade-ui-kit copied to clipboard
Initiate FlatPickr component on page load instead of mouse-enter
Currently the flatpickr component only get loaded when a mouse hovers the input. When using this with an empty value this doesn't have any issues. But when you're on the edit page of a traditional CRUD design you will first see an unformatted default HTML input and it 'jumps' to a different format when hovering. See the attached video for an example.
https://github.com/blade-ui-kit/blade-ui-kit/assets/4124579/beb53b78-1efb-4ecf-ac58-18b44c918c05
By replacing the mouse-enter with x-init
and nextTick
we ensure that the flatpickr components get loaded after Alpine has completely finished rendering .
This way when a value is set for the flatpickr it will be initiated correctly with this format.
Can someone take a look at this @caneco @driesvints or @nuernbergerA ?
Is this project no longer maintained ? @caneco @driesvints or @nuernbergerA ?
Thanks. I'm sorry it took this long.