Support the ongoing development of Laravel.io →
posted 1 year ago
Nova
0

But when it is

absolutely necessary

, which code/methods do you use ?

Last updated by @sergeynilov 1 year ago.
0

I define Date field as :

                    Date::make(__('Published at'), 'published_at')
                        ->displayUsing(fn($value) => $value ? DateConv::getFormattedDateTime($value) : '--')
                        ->sortable(),

where DateConv::getFormattedDateTime apply format j F, Y g:i A and label in index/view pages looks like 3 July, 2024 11:21 AM

but in details editor 07/23/2024 that is very inconvinient. In my country more used format is 'yyyy-mm-dd'. If there is a way to apply this format ?

0

Sign in to participate in this thread!

Native PHP

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.