malzariey/filament-daterangepicker-filter
Alpine.js-powered date range picker and filter for Filament. Pick day/month/year ranges with presets, optional time selection (12/24h), keyboard input validation, localization, accessibility, and modal/slide-over friendly dropdown teleport. Matches Filament v4 UI.
apply.daterangepicker) for bespoke logic (e.g., triggering alerts on date selection).whereBetween queries with user-friendly presets (e.g., "Last 30 Days").Adopt if:
<body> is enabled by default).Look elsewhere if:
"This package lets our Filament admin panels offer intuitive date-range filters—critical for analytics, compliance, and reporting—without custom dev work. It replaces clunky jQuery solutions with a modern, accessible UI that works globally (supports 50+ languages) and integrates seamlessly with our existing tools. For example, sales teams could instantly filter MRR data by quarter, while support could audit logs by week—saving 3+ dev weeks and improving user adoption."
ROI:
*"This is a drop-in replacement for Filament’s basic date inputs, adding:
apply.daterangepicker to trigger side effects).Key Trade-offs:
Migration Path:
TextInput or DatePicker fields with DateRangePicker.->ranges(['This Month' => [now()->startOfMonth(), now()]])).useDualState() for complex forms where start/end dates need separate validation.Example Impact:
// Before: Manual SQL + frontend date inputs
$query->whereBetween('created_at', [$startDate, $endDate]);
// After: One line in Filament
DateRangeFilter::make('created_at')->ranges([
'This Week' => [now()->startOfWeek(), now()->endOfWeek()],
]);
```"
How can I help you explore Laravel packages today?