F
Filament3mo ago
Jack

Format datetime picker

Hi all, Having some issues trying to format the datetime picker? Any clues?
Forms\Components\DateTimePicker::make('created_at')
->format('l jS M H:i:s')
->disabled()
->hiddenOn('create'),
Forms\Components\DateTimePicker::make('updated_at')
->format('l jS M H:i:s')
->disabled()
->hiddenOn('create'),
Forms\Components\DateTimePicker::make('created_at')
->format('l jS M H:i:s')
->disabled()
->hiddenOn('create'),
Forms\Components\DateTimePicker::make('updated_at')
->format('l jS M H:i:s')
->disabled()
->hiddenOn('create'),
Is still outputting
No description
4 Replies
Dennis Koch
Dennis Koch3mo ago
I think you are looking for ->displayFormat()
Jack
Jack3mo ago
oh my bad, thank you
Dennis Koch
Dennis Koch3mo ago
It’s mentioned in the docs:
You may customize the format of the field when it is saved in your database
Jack
Jack3mo ago
No description