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
5.0.6

What's Changed

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/5.0.5...5.0.6

5.0.4

Month picker manual input stability

This patch release completes the editable month picker work and fixes the input-mask crash found while testing the demo environment.

Fixed

  • Month/year picker manual input no longer uses IMask's day-date mask for month-only or year-only formats.
  • Typing partial short-year values such as 01/22 in monthPicker()->singleCalendar()->allowInput()->format('m/Y') no longer causes a maximum call stack error.
  • Invalid partial month input stays non-destructive: the previous valid state remains selected until the user enters a complete valid value or clears the field.
  • The month picker header avoids stale bundled-JS Alpine references while keeping direct year editing and year navigation.

Demo

  • Added a Workbench demo field for the exact manual-input configuration: monthPicker()->singleCalendar()->allowInput()->format('m/Y')

Verification

  • npm test: 116 passed
  • npm run build: passed, rebuilt dist assets
  • composer test: 148 passed
  • php -l workbench/app/Filament/Pages/DemoPage.php: passed
5.0.2

Summary

Patch release for month picker editing and keyboard handling fixes.

Fixed

  • Fixed month picker manual input Enter handling so typed month values are parsed and applied before keyboard confirmation logic.
  • Fixed month/year picker Enter behavior so non-day pickers do not call day-selection code.
  • Fixed invalid partial manual input overwriting the previous valid month picker state.

Added

  • Added a direct year select control in the month picker popup header.
  • Added month picker year option constraints based on existing minYear, maxYear, minDate, and maxDate configuration.

Compatibility

  • No PHP public API changes.
  • Existing day picker Enter behavior remains unchanged.
  • showDropdowns() day picker behavior remains unchanged.
  • Built dist assets are included.

Verification

  • npm test: 4 test files passed, 114 tests passed.
  • npm run build: completed successfully and regenerated dist assets.
  • composer test: 148 tests passed, 213 assertions.

Pull Request

5.0.1

What's Changed

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/5.0.0...5.0.1

5.0.0

🚀 v5.0 — Complete Rewrite: Alpine.js + Day.js

A ground-up rewrite replacing jQuery & Moment.js with a native Alpine.js component powered by Day.js.

This is a major release with breaking changes. The entire frontend has been rebuilt from scratch for better performance, smaller bundle size, and seamless Filament v4/v5 integration.


✨ What's New

Architecture

  • Alpine.js Native — No more jQuery dependency. The picker is a first-class Alpine.js component with full Livewire reactivity.
  • Day.js — Replaced Moment.js (330KB) with Day.js (7KB) for date manipulation. ~97% smaller.
  • Floating UI — Replaced manual positioning with [@floating-ui](https://github.com/floating-ui)/dom for robust dropdown placement that handles scroll, resize, and viewport edges automatically.
  • IMask.js — Integrated input masking for precise manual date entry with auto-padding and block navigation.

New Features

  • 🗓️ Month Picker->monthPicker() for selecting month ranges
  • 📅 Year Picker->yearPicker() for selecting year ranges
  • ⌨️ Manual Input->allowInput() enables typed date entry with format-aware masking
  • 🎯 Teleport->teleport() (enabled by default) moves the dropdown to <body>, solving z-index issues in modals and slide-overs
  • Keyboard Navigation — Full arrow key, Home/End, PageUp/PageDown, Enter/Escape support
  • 🔗 Dual State Fields->dualState('start_field', 'end_field') syncs to two separate Livewire properties
  • 📝 PHP Format Tokens->format('Y-m-d') uses PHP Carbon tokens. The package auto-converts to Day.js tokens for the frontend.
  • 🌍 32 Bundled Locales — All locales are statically imported and work without async loading: ar, cs, da, de, el, es, fa, fr, he, hu, id, it, ko, ku, lt, lv, nb, nl, pl, pt, pt-br, ro, ru, sk, sl, tr, uk, uz, vi, zh-cn, zh-tw

Performance & Quality

  • Synchronous Init — No more async init(). Locales are bundled, eliminating runtime import latency.
  • 🧹 Static Format Map — PHP→Day.js format conversion uses a static class constant instead of rebuilding on every call.
  • 🎯 Strict Comparisons — All ==/!= replaced with ===/!== across the codebase.
  • 🧪 148 Tests — Comprehensive Pest test suite covering fields, filters, formats, Livewire integration, and default presets.

💥 Breaking Changes

Dependencies Removed

Removed Replaced By
jquery Alpine.js (bundled with Filament)
moment / moment-timezone dayjs ^1.11
daterangepicker (jQuery plugin) Native Alpine.js component

API Changes

Format Method

- ->displayFormat('DD/MM/YYYY')  // Day.js tokens (still works, deprecated)
+ ->format('d/m/Y')              // PHP Carbon tokens (recommended)

Deprecated Methods

These methods still work but will be removed in a future version:

Deprecated Use Instead
->displayFormat('DD/MM/YYYY') ->format('d/m/Y')
->setTimePickerOption(true) ->timePicker()
->setTimePickerIncrementOption(15) ->timePickerIncrement(15)
->setTimePicker24HourOption(true) ->timePicker24()
->setTimePickerSecondOption(true) ->timePickerSecond()
->setAutoApplyOption(true) ->autoApply()

Filament Version

  • Requires Filament v4.0+ or Filament v5.0+
  • Uses Filament\Support\Facades\FilamentTimezone for system timezone

📋 Migration Guide

1. Update Dependencies

composer require malzariey/filament-daterangepicker-filter:^5.0

2. Remove jQuery/Moment Assets

If you were manually including jQuery or Moment.js for this package, remove them — they're no longer needed.

3. Update Format Calls

// Before (v4)
DateRangePicker::make('range')->displayFormat('DD/MM/YYYY');

// After (v5) — use PHP Carbon tokens
DateRangePicker::make('range')->format('d/m/Y');

4. New Features (Optional)

// Month picker
DateRangePicker::make('month_range')->monthPicker();

// Year picker
DateRangePicker::make('year_range')->yearPicker();

// Manual input with masking
DateRangePicker::make('range')->allowInput();

// Dual state (sync to two separate properties)
DateRangePicker::make('range')->dualState('start_date', 'end_date');

📦 Requirements

Requirement Version
PHP ^8.1
Laravel ^10.0 | ^11.0 | ^12.0 | ^13.0
Filament ^4.0 | ^5.0

Runtime JS Dependencies (bundled)

Package Version Purpose
dayjs ^1.11 Date manipulation
[@floating-ui](https://github.com/floating-ui)/dom ^1.6 Dropdown positioning
imask ^7.6 Input masking

🙏 Contributors

Thanks to all contributors who helped shape this release:


Full Changelog: 4.0.9...5.0.0

4.1.beta.2
4.0.7

What's Changed

New Contributors

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/4.0.1...4.0.7

4.1.beta.1

Release v4.1.beta

This release marks a significant milestone in the evolution of the Filament DateRangePicker. We have completely rewritten the core implementation, moving away from heavy legacy dependencies to a modern, lightweight, and reactive stack perfectly aligned with the Filament ecosystem.

🌟 Highlights

  • Total Rewrite: Replaced the legacy jQuery & Moment.js plugin with a native Alpine.js & Day.js implementation.
  • Improved Performance: Significantly lighter bundle size and faster rendering.
  • Native Reactivity: Seamless integration with Livewire via Alpine.js state management.
  • Better Positioning: Implemented Floating UI for robust and accessible dropdown positioning.

⚠️ Breaking Changes

  • Dependencies Removed: jquery, moment, and the legacy daterangepicker.js file have been removed.
  • Asset Changes: The main JS entry point is now resources/js/filament-daterangepicker.js.
  • Event Handling: jQuery events ($('#picker').on('apply.daterangepicker', ...)) are no longer supported. Use native event listeners or Alpine.js bindings.

🚀 New Features

1. Modern Event Dispatching

We now dispatch native CustomEvents directly on the component element, making integration with Livewire and vanilla JS easier than ever:

// Listen for events
element.addEventListener('apply.daterangepicker', (e) => {
    console.log('New Date Range:', e.detail); // { start, end, label }
});

Available events: show, hide, apply, cancel.

2. Enhanced Time Picker

  • True Sync: Time changes are now immediately reflected in the underlying date objects.
  • Seconds Support: fully supported in 12h and 24h modes.

3. Developer Experience

  • Debounced Sync: Prevents aggressive Livewire roundtrips during rapid date selection.
  • Memory Safety: extensive cleanup of event listeners and observers to prevent memory leaks in SPA environments.

🧪 Testing

This release is backed by a comprehensive new test suite:

  • Unit Tests: 100% coverage of core logic via Vitest.
  • E2E Tests: Automated browser verification via Playwright.
  • Browser Tested: Verified across 18+ configuration scenarios (Ranges, Limits, Masks, Localization).

📦 Installation / Upgrade

No special steps required beyond updating the package. Run the build command to ensure the new assets are compiled:

npm run build

Note: This is a beta release. Please report any issues on the GitHub repository.

3.4.3

What's Changed

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/4.0.0...3.4.3

3.4.1

What's Changed

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/3.4.0...3.4.1

3.4.0

What's Changed

New Contributors

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/3.3.1...3.4.0

3.1.1

What's Changed

  • Remove unnecessary tailwind import, Fixes #140 @malzariey
  • Adding Autofocus property to input, Addresses #141 (Workaround using ->modalAutofocus(false)) to modal @malzariey

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/3.1.0...3.1.1

3.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/3.0.5...3.1.beta

3.0.1

What's Changed

  • Revert Date Range Picker Isolation, Fixes #117 @malzariey

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/3.0.0...3.0.1

2.8.0

What's Changed

New Contributors

Full Changelog: https://github.com/malzariey/filament-daterangepicker-filter/compare/2.7.3...2.8.0

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.
monarobase/country-list
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity