github malzariey/filament-daterangepicker-filter 5.0.11
5.0.11 — date columns, localized names, typed times and the options that did nothing

one hour ago

Fixed

Filtering and data

  • date columns filter by calendar date — a DATE column filtered with a display timezone west of UTC (e.g. New York) returned the next day, and on SQLite even a UTC display missed rows. A real DATE column (from the schema, or a date cast when the schema can't be read) is now compared as a calendar date with no timezone shift. DATETIME/TIMESTAMP columns, created_at/updated_at and every column that isn't a DATE column keep the storage-timezone conversion exactly as before. See "Date Columns" in the README.
  • Localized month and day names are read by the filter — ->format('F Y'), d M Y, weekday names and AM/PM written in the page locale (Arabic, Persian, German, French, Russian, Hebrew, Chinese, Kurdish, …) were silently ignored, so the filter returned every row. They now parse in all 31 bundled locales.
  • default*() ranges cover whole days with timePicker() — defaultYesterday() produced 15:00 - 15:00 (matching nothing) and defaultLast7Days() started at the current time. Defaults now run from the start of the first day to the end of the last, like the presets, and they follow timezone()/timePicker() even when those are called after the default.
  • Defaults fill dual-state fields — on a create form, default*() / default() on a useDualState() field now fill the picker and both backing fields. Stored values still win on edit.
  • Persian and Kurdish indicators show the dates — their translation had no :label/:period placeholders. Also: the French indicator reads "Période", and weekLabel is translated for Arabic, Persian, Kurdish and Chinese.

Picker

  • Typed times are kept — on a time picker with allowInput(), typed times like 08:00/17:30 were replaced by 00:00/23:59.
  • 12-hour typing works — the AM/PM part of the mask accepted nothing, so a 12h value could not be typed. It now takes a/p or the locale's AM/PM (e.g. Arabic ص/م), and the 12h selects show the stored time instead of 1:00 AM / 1:59 PM.
  • maxSpan() limits presets and typed ranges — presets are clamped to the span and typed ranges longer than it are rejected.
  • minYear()/maxYear() limit the day calendars — the month arrows stop at the bounds and days outside them can't be picked or typed.
  • No console error when changing the month dropdown.
  • teleport(false) renders the dropdown in place (inside the field), including inside modals.
  • alwaysShowCalendar(false) works — the dropdown opens on the presets plus a "Custom" entry that shows the calendars.
  • Keyboard navigation — arrow keys move between days (mirrored in RTL), Home/End go to the week's start/end, PageUp/PageDown change month (Shift for year), and Enter/Space select. ArrowDown from the input moves into the calendar. Escape returns focus to the input.
  • A flipped dropdown keeps its alignment — opens('left')/opens('right') no longer become centred when the dropdown opens upward.
  • RTL time selects read hours then minutes.
  • icon() works in either order with disableClear(), and placeholder() shows on allowInput() fields until they're focused.

Added

  • readOnly() on the field — the picker doesn't open and Clear is hidden, but the value is still saved (unlike disabled()).

Behaviour changes to note

  • Days outside minYear()/maxYear() are now disabled in the day picker, and presets longer than maxSpan() are clamped.
  • Fields that already call teleport(false) or alwaysShowCalendar(false) change layout: those options did nothing until now.
  • ArrowDown in an open picker's input now moves focus into the calendar instead of moving the caret.
  • Filtering a column the model doesn't cast (other than its timestamps) now reads that column's type from the schema once per request.

Upgrading

Run php artisan filament:assets after updating; the JS and CSS changed.

Don't miss a new filament-daterangepicker-filter release

NewReleases is sending notifications on new releases.