© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
toeknee

TernaryFilter not working with date column?

I've got this same filter working on a varchar column, but on a date column with:

                TernaryFilter::make('dob')
                    ->label('Date of Birth?')
                    ->trueLabel('Has Date of Birth')
                    ->falseLabel('Missing Date of Birth?')
                    ->queries(
                        true: fn (Builder $query): Builder => $query->whereNotNull('dob'),
                        false: fn (Builder $query): Builder => $query->whereNull('dob'),
                    )
                    ->nullable(),
                TernaryFilter::make('dob')
                    ->label('Date of Birth?')
                    ->trueLabel('Has Date of Birth')
                    ->falseLabel('Missing Date of Birth?')
                    ->queries(
                        true: fn (Builder $query): Builder => $query->whereNotNull('dob'),
                        false: fn (Builder $query): Builder => $query->whereNull('dob'),
                    )
                    ->nullable(),


it never gets applied and so it doesn't run.
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

Searchable not working on date column.
FilamentFFilament / ❓┊help
3y ago
Excel Export with Date Column
FilamentFFilament / ❓┊help
2y ago
Columns\TextInputColumn->type('date') not working as expected
FilamentFFilament / ❓┊help
12mo ago
Export Column State Not Working
FilamentFFilament / ❓┊help
2y ago