© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
11 replies
hello_world

afterStateUpdated() is not working in Datepicker inside livewire components

 DatePicker::make('date')
                    ->label('')
                    ->afterStateUpdated(function ($state) {
                        info($state);
                    })
                    ->native(false)
                    ->reactive()
                    ->minDate(Carbon::now())
                    ->closeOnDateSelection()
                    ->extraAttributes(['class' => 'date_picker']),
 DatePicker::make('date')
                    ->label('')
                    ->afterStateUpdated(function ($state) {
                        info($state);
                    })
                    ->native(false)
                    ->reactive()
                    ->minDate(Carbon::now())
                    ->closeOnDateSelection()
                    ->extraAttributes(['class' => 'date_picker']),

this is my code please check
when i use tis DatePicker in Normal Resource or widget the afterStateUpdated() is working but not working if i put the same DatePicker inside a Livewire component Form
Solution
Ok sounds like you haven't filled your component.

ensure you have $this->form->fill() on the mount method.
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

datepicker format not working inside wizard
FilamentFFilament / ❓┊help
3y ago
Rich editor not working inside Livewire component
FilamentFFilament / ❓┊help
2y ago
afterStateUpdated function not working
FilamentFFilament / ❓┊help
2y ago
Close modal inside afterStateUpdated in form
FilamentFFilament / ❓┊help
14mo ago