Weave 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
Nova Date Range Filter

Nova Date Range Filter Laravel Package

ampeco/nova-date-range-filter

A Laravel Nova filter for narrowing resource index queries by date or datetime columns. Add it to a Nova filter panel so users can choose start and end dates and apply the range to supported model fields.

View on GitHub
Deep Wiki
Context7

A Laravel Nova date range filter.

Frequently asked questions about Nova Date Range Filter
What does ampeco/nova-date-range-filter actually do?
It is a Laravel Nova filter that lets you narrow a resource index query by a date or datetime column using a start date and an end date. You register it in a resource's filters() method, and Nova renders the date pickers in the filter panel above the index. When a user applies a range, the filter adds the corresponding where-clause constraint to the underlying Eloquent query. It is a small, self-contained admin-panel utility with no models, migrations, service providers, queues, or middleware of its own.
How do I install ampeco/nova-date-range-filter?
Install it with Composer using composer require ampeco/nova-date-range-filter, then register the filter class in the filters() array of each Nova resource whose index you want to filter by date. There is no configuration file, no publish step, and no migration to run. You will need a valid Laravel Nova license in the project, since the package is an extension of Nova rather than a standalone tool. Plan to install it on a branch first and confirm it resolves against your existing lockfile.
Does this package work with Laravel Nova 4 or Nova 5?
Treat Nova 4 and Nova 5 as unsupported until you verify it yourself. The last release was 2021-09-28, so the package targets Nova 3.x-era tooling and the Vue 2 asset pipeline, while Nova 4 and 5 changed both the frontend build and parts of the filter contract. The fastest check is to read the nova constraint in the package's composer.json and attempt a Composer install against your current lockfile; a version conflict is a clean rejection signal. If the filter loads but silently emits a no-op or malformed constraint, that is the failure mode to watch for in staging.
Which PHP and Laravel versions does ampeco/nova-date-range-filter support?
The declared PHP and Laravel ranges are whatever appears in the package's composer.json, which dates from a 2021 release and therefore reflects Laravel 8 and 9 conventions. On a newer application you should expect those constraints to conflict with your lockfile even if the filter logic itself would still work. Read the composer.json constraints first, then let Composer tell you in minutes whether the dependency is installable alongside your current stack.
How do I add the date range filter to a Nova resource?
Add the package's filter class to the array returned by the resource's filters() method, passing the column it should constrain, for example a created_at or published_at column. Each filtered column needs its own entry in that array, so a resource filtered on two date fields gets two filter instances. The filter only affects the index query for that resource and does not alter the underlying schema. Because it is a Nova filter, the applied range lives in the panel state rather than in the resource definition.
Doesn't Nova already support date filtering natively?
Modern Nova ships built-in date filtering, so the first question is whether native filtering already covers your arbitrary start/end range selection on the relevant resource. If it does, adding this package is a net increase to your dependency count for no behaviour change. Check the native filter options against your actual use case before evaluating the package at all. This package only makes sense if you are on an older Nova version or need a range behaviour the native filters do not provide.
Is ampeco/nova-date-range-filter still maintained?
The last release was 2021-09-28, and there is no evidence of recent commits, so treat it as unmaintained. It has roughly 35 stars and no dependents, which means there is no community absorbing maintenance or reporting breakage on newer Nova versions. That is acceptable for a small admin utility, but it means you own the risk of every future Nova breaking change. If that risk matters, vendor the code rather than depending on it.
Can it filter datetime and timestamp columns, and how does it handle timezones?
It applies the range to whichever date or datetime column you point it at, so it works for timestamps, but the boundary handling depends entirely on how the where-clause is generated. Timezone-sensitive columns are the case to test explicitly: a range compared against stored UTC timestamps will not match what an editor expects if they are picking dates in a local timezone. Run a few edge cases in staging, especially records at exactly midnight and the end-date boundary, before you rely on the results.
Should I require it via Composer or copy the filter into my app?
For most teams, copying is the better trade. The filter logic is roughly 100 to 200 lines, so vendoring it into an application-local class such as app/Nova/Filters/YourDateRangeFilter removes upstream abandonment risk while preserving the behaviour. Requiring it via Composer just defers an unknown cost, whereas copying is a small, known, one-time cost with the repository as reference source. Either way, validate on a branch in staging before merging to your main inventory of Nova filters.
How do I test that the filter produces correct results in production?
Exercise it in staging with known records and inspect the generated SQL rather than trusting the UI alone, since the realistic failure is a filter that renders correctly but emits no constraint at all. Confirm it binds properly, that the start and end boundaries behave inclusively as expected, and that other filters in the panel still combine correctly with it. Because the component is confined to Nova's index screen, the blast radius is one dropdown in an internal tool, so a failed evaluation costs nothing beyond the time spent checking. Keep it off the critical path and treat it as a throwaway unless you have decided to fork and own it.
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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons