How to reactively update the `displayFormat()` of DatePicker?
This will not work. It shows the display format changed in the html, but not in the UI:
Solution:Jump to solution
Hey, just wanted to check up on this and let you know that I found a fix/hack using this:
```php
Select::make('date_format')
->options(DateFormat::class)
->required()...
6 Replies
Not sure, whether you can do this at all after the DatePicker is initialized
That’s very unfortunate
Probably depends on whether the DatePicker we use supports reinit with a new configuraiton. I'm just guessing though
Alright well I guess I will just have to change the display format after the record is saved. Would be cool to change it dynamically tho!
Thanks
Solution
Hey, just wanted to check up on this and let you know that I found a fix/hack using this:
The
extraAttributes()
was added just to reinitialize the field after the state change