© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
Bruno Pereira

change data before create/edit actions on modal

Hey guys so I have a resource that uses a modal to perform the create and edit actions and I have two datepickers (start_date and end_date) and they work ok but I want to when I persist the changes I want that start_date starts at the beginning of the day and end_date at end of day.

I saw that I can change the handleRecordUpdate but only works when I have the create or edit page created.

Thanks in advance
Solution
fixed using dehydrateStateUsing on the form method like:
->dehydrateStateUsing(fn (string $state): string => Carbon::parse($state)->startOfDay()->toISOString())
->dehydrateStateUsing(fn (string $state): string => Carbon::parse($state)->startOfDay()->toISOString())
Jump to solution
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

Edit create modal actions
FilamentFFilament / ❓┊help
15mo ago
Edit modal actions
FilamentFFilament / ❓┊help
3y ago
Change bottom actions on edit page
FilamentFFilament / ❓┊help
3y ago
Change edit modal width
FilamentFFilament / ❓┊help
2y ago