How to deal with timezones using DatePicker in Filament v2
I am using the following code:
When I select 20th of October, it will save as 20th of october (yay! 🥳).
However, when I do not modify the date at all, and save the form, the date will be the one from
formatStateUsing
, but subtracted by 1 day.
This issue does not occur when using the following code with ->timezone('UTC')
:
In my model:
My local timezone:
config/app.php
-> 'timezone' => 'Europe/Amsterdam',
I find it strange that the timezone has anything to do with this, as this is a date picker, not date time. Plus, my model is cast as date, not date time. Dates should not differ based on timezone. Is this a bug, feature or am I missing something?

0 Replies