DateRangeFilter
Records with a date between two dates; both bounds are optional and inclusive.
use Anvil\Collection\Filters\DateRangeFilter;
DateRangeFilter::make('entry_date'),DateRangeFilter::make('created')->column('created_at')->label('Created'),Options
Section titled “Options”Control
Section titled “Control”Two date inputs “from” and “until” with the browser’s date picker. Either can stay empty: only “from” finds everything since, only “until” everything up to that day.
| Bound | Condition |
|---|---|
| from | column >= from |
| until | column < until + 1 day |
“Until” includes the whole day, also for DATETIME columns: until
2026-03-31 finds a record of 2026-03-31 18:45. Dates must be Y-m-d;
anything else is rejected (422).
Saved views, presets and API
Section titled “Saved views, presets and API”['from' => '2026-01-01', 'until' => '2026-12-31'], each bound optional.
API: filter[created][from]=2026-01-01&filter[created][until]=2026-12-31.