Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Daterangepicker Filter Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enhanced Data Exploration: Accelerates development of analytics dashboards, reporting tools, or audit logs by providing a native, high-performance date range picker for Filament admin panels. Reduces reliance on jQuery-based solutions (e.g., Bootstrap DateRangePicker) and improves UX with modern Alpine.js/Day.js integration.
  • Roadmap Prioritization: Justifies investment in time-based filtering for:
    • SaaS Metrics: MRR/ARR cohort analysis (e.g., "Show revenue for Q1 2024").
    • Compliance Tools: Audit trails with granular date ranges (e.g., "Last 7 days of API calls").
    • E-commerce: Seasonal sales reports (e.g., "Black Friday 2023").
  • Build vs. Buy:
    • Buy: Avoids reinventing wheel for date-range UIs in Filament (saves ~2–4 dev weeks).
    • Customize: Extensible via events (e.g., apply.daterangepicker) for bespoke logic (e.g., triggering alerts on date selection).
  • Use Cases:
    • Filters: Replace whereBetween queries with user-friendly presets (e.g., "Last 30 Days").
    • Forms: Collect date ranges for subscriptions (e.g., "Billing Period: 06/2024–08/2024").
    • Localization: Support multilingual apps with Day.js locales (e.g., Arabic, Japanese).

When to Consider This Package

  • Adopt if:

    • Your Filament v4+ app needs date-range inputs with month/year granularity (not just days).
    • You require keyboard accessibility (e.g., for screen readers or power users).
    • Your team prioritizes modern JS (Alpine.js/Day.js) over legacy jQuery.
    • You need presets (e.g., "Today," "Last 7 Days") without custom dev work.
    • Z-index conflicts plague your dropdowns (teleporting to <body> is enabled by default).
  • Look elsewhere if:

    • You’re using Filament v3 (this package targets v4+).
    • Your app needs complex date math (e.g., fiscal year calculations)—consider a custom solution.
    • You require server-side rendering of the picker (this is client-side only).
    • Your team lacks Alpine.js familiarity (though the package abstracts most complexity).
    • You need multi-calendar support (e.g., comparing two non-overlapping ranges simultaneously).

How to Pitch It (Stakeholders)

For Executives:

"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:

  • Time Saved: ~2–4 weeks vs. building from scratch.
  • UX Gain: Native Filament styling + keyboard/mobile support.
  • Scalability: Handles edge cases (e.g., disabled dates, time zones) out of the box.

For Engineers:

*"This is a drop-in replacement for Filament’s basic date inputs, adding:

  • Month/year pickers (not just days).
  • Presets (e.g., ‘Last 30 Days’) with zero boilerplate.
  • Alpine.js/Day.js (future-proof, no jQuery bloat).
  • Events for custom logic (e.g., apply.daterangepicker to trigger side effects).

Key Trade-offs:

  • Pros: Lightweight (~50KB), actively maintained (releases every 2–3 months), Filament-native.
  • Cons: Requires Filament v4+; limited to client-side use.

Migration Path:

  1. Replace TextInput or DatePicker fields with DateRangePicker.
  2. Leverage presets to reduce query complexity (e.g., ->ranges(['This Month' => [now()->startOfMonth(), now()]])).
  3. Use 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()],
]);
```"
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor