© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
19 replies
Saade

DatePicker creating records wrongly but editing correctly

I have an app configured with
UTC
UTC
timezone, and form with the following date picker (DATE ONLY, no time):

Forms\Components\DatePicker::make('start_date')
  ->label('Data de início')
  ->timezone('America/Sao_Paulo')
  ->required(),
Forms\Components\DatePicker::make('start_date')
  ->label('Data de início')
  ->timezone('America/Sao_Paulo')
  ->required(),


If i select
2023-03-09
2023-03-09
in the form, it CREATES in the database as
2023-03-09
2023-03-09
(wrong, it should save as D-1)
If i view the record, it will show as
2023-03-08
2023-03-08
(wrong, because of timezone)
Then i edit this date back to
2023-03-09
2023-03-09
and it UPDATES to
2023-03-10
2023-03-10
(correct, D-1)
If i view the record, it will show as
2023-03-09
2023-03-09
(which is now correct)

WTF is going on? Am i dumb and don't know how timezone works?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Creating records and editing information
FilamentFFilament / ❓┊help
3y ago
Editing Records
FilamentFFilament / ❓┊help
10mo ago
Enum is cast when creating but not editing
FilamentFFilament / ❓┊help
12mo ago
problem when editing or viewing deleted records
FilamentFFilament / ❓┊help
3y ago