F
Filament11mo ago
Flash

Setting current date and time on DateTimePicker

Hi, Is it possible to display a "now" button or something that sets the date time picker fields to the current date and time? Thanks
5 Replies
Patrick Boivin
Patrick Boivin11mo ago
There should be a Today button in the date picker... but it could depend on your browser.
awcodes
awcodes11mo ago
Gist
NowAction
NowAction. GitHub Gist: instantly share code, notes, and snippets.
Flash
Flash11mo ago
Thanks for the responses. I can't see it on either date picker. I will try the code from the gist. Thanks again. Sorry. Is this is a Livewire component or is there a Filament console command to create custom actions? Thanks.
awcodes
awcodes11mo ago
It’s just a standard class. It extends the Filament action.
Flash
Flash11mo ago
I got it working. I put it in an Actions folder in the app directory. Thanks.