wdelfuego / nova-datetime

Makes working with DateTime fields in Laravel's Nova easier
10 stars 1 forks source link

Format being ignored... #4

Closed martyn62 closed 1 year ago

martyn62 commented 1 year ago

Trying to set the format using globalFormat (and have tried inline as well). Ripping my hair out!

Getting an error as below.. Screenshot 2022-10-28 212715

Seems like globalFormat & have tried inline withDateFormat are being ignored. Screenshot 2022-10-28 213054

Any ideas?

Nova 4.17.1

Everything up to date.

martyn62 commented 1 year ago

Just to confirm the config is in place. image

wdelfuego commented 1 year ago

Hi @martyn62 !

I don't think this is an issue with this package; you're getting an SQL error but this package isn't involved with how DateTime objects are stored; only with how they're displayed in Nova fields.

If you remove this package from your project, do you still get these errors using the default Nova DateTime fields?

martyn62 commented 1 year ago

Thanks for your reply. Yes my mistake sorry I'd overlooked protected $casts on the items.

wdelfuego commented 1 year ago

Good to hear, thanks for the update!