© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
16 replies
Abi

DatePicker not disabling dates outside of min and max dates

I have the following code to create a
DatePicker
DatePicker
for Table Filter

$minDate = Carbon::parse('12/26/2023');
$minDate = Carbon::parse('12/28/2023');
DatePicker::make('created_from')
    ->default(Carbon::now())
    ->minDate($minDate)
    ->maxDate($maxDate),
$minDate = Carbon::parse('12/26/2023');
$minDate = Carbon::parse('12/28/2023');
DatePicker::make('created_from')
    ->default(Carbon::now())
    ->minDate($minDate)
    ->maxDate($maxDate),

but the dates outside of min and max dates don't seem to be disabled. Am I missing something here?
Solution
POC:
Forms\Components\DatePicker::make('poc_date')
    ->minDate(now()->startOfMonth()->addDay())
    ->maxDate(now()->endOfMonth()->subDay())
    ->disabledDates(['2023-12-9', '2023-12-10'])
    ->native(false),
Forms\Components\DatePicker::make('poc_date')
    ->minDate(now()->startOfMonth()->addDay())
    ->maxDate(now()->endOfMonth()->subDay())
    ->disabledDates(['2023-12-9', '2023-12-10'])
    ->native(false),

will get you this:
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

Dynamic min max datepicker filter in widget table
FilamentFFilament / ❓┊help
3y ago
Datepicker enable range dates
FilamentFFilament / ❓┊help
3y ago
Image min and max width and height
FilamentFFilament / ❓┊help
3y ago
Form DatePicker add disabled dates to existing ones.
FilamentFFilament / ❓┊help
12mo ago