F
Filament16mo 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 Boivin16mo ago
There should be a Today button in the date picker... but it could depend on your browser.
awcodes
awcodes16mo ago
Gist
NowAction
NowAction. GitHub Gist: instantly share code, notes, and snippets.
Flash
FlashOP16mo 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
awcodes16mo ago
It’s just a standard class. It extends the Filament action.
Flash
FlashOP16mo ago
I got it working. I put it in an Actions folder in the app directory. Thanks.
Want results from more Discord servers?
Add your server