PHPackages                             rpj/daterangepicker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. rpj/daterangepicker

ActiveLibrary[Search &amp; Filtering](/categories/search)

rpj/daterangepicker
===================

A simple Date Range filter for Laravel Nova 4.

0.0.11(1y ago)572.1k—4.3%16MITPHPPHP &gt;=8.1

Since Dec 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rodrigopaco1986/simple-daterange-picker)[ Packagist](https://packagist.org/packages/rpj/daterangepicker)[ Fund](https://www.buymeacoffee.com/rodrigopaco)[ RSS](/packages/rpj-daterangepicker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

Simple Date Range Filter for Laravel Nova 4
-------------------------------------------

[](#simple-date-range-filter-for-laravel-nova-4)

A filter for Nova 4 that displays a Date Range Picker instead of a single date picker using [Daterangepicker library](https://www.daterangepicker.com/)

### Install

[](#install)

Run this command in your nova project: `composer require rpj/daterangepicker`

### How to use

[](#how-to-use)

In your Nova resource, just add DateRangeFilter class in the filters function, and include the column(s) that you would like to use as filter the resource.

```
 use Rpj\Daterangepicker\Daterangepicker;

 public function filters(Request $request)
    {
        return [
            new Daterangepicker('created_at'),
        ];
    }
```

Column name can be a string or an array of strings with two items. Otherwise an exception will be fired.

```
 use Rpj\Daterangepicker\Daterangepicker;

 public function filters(Request $request)
    {
        return [
            new Daterangepicker(['created_at', 'updated_at']),
        ];
    }
```

Also, you can pass a string with default date range to use in the component. If no value is passed, TODAY value is set as default, but if you want to remove the date filter to show all records, you can use DateHelper::ALL

Additionally, we added a custom date range picker that allows user to specify the column to order by with its value and as well as in the case of a joined table to prevent ambiguous mysql error, you can specify the actual table name to know the actual column you are referring to. this takes, the column to check the date range picker and as well as the column to order by with the asc/desc direction.

```
use Rpj\Daterangepicker\Daterangepicker;
use Rpj\Daterangepicker\DateHelper;

public function filters(Request $request)
{
    return [
        new Daterangepicker('users.created_at', DateHelper::THIS_WEEK, 'users.name', 'desc'),
    ];
}
```

Finally, we have added the option to set a custom pre set dates using Carbon class. Also you can set a min and max date for the date range component.

```
use Rpj\Daterangepicker\Daterangepicker;
use Rpj\Daterangepicker\DateHelper;
use Carbon\Carbon;

public function filters(Request $request)
{
    return [
        (new Daterangepicker(
            'users.created_at',
            DateHelper::THIS_WEEK,
            'users.name',
            'desc'
        ))
        ->setRanges([
            'Today' => [Carbon::today(), Carbon::today()],
            'Yesterday' => [Carbon::yesterday(), Carbon::yesterday()],
            'This week' => [Carbon::now()->startOfWeek(), Carbon::now()->endOfWeek()],
            'This month' => [Carbon::now()->startOfMonth(), Carbon::now()->endOfMonth()],
            'Last month' => [Carbon::now()->subMonth()->startOfMonth(),Carbon::now()->subMonth()->endOfMonth()],
        ])
        ->setMaxDate(Carbon::today())
        ->setMinDate(Carbon::today()->endOfYear()),
    ];
}
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance41

Moderate activity, may be stable

Popularity40

Moderate usage in the ecosystem

Community14

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Recently: every ~82 days

Total

11

Last Release

488d ago

PHP version history (2 changes)0.0.1PHP ^7.3|^8.0

0.0.2PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c523730acc3392db32cfc543f455f27b6acb539bf459ad41cbd39b26e7a5234?d=identicon)[rodrigopaco.1986](/maintainers/rodrigopaco.1986)

---

Top Contributors

[![rodrigopaco1986](https://avatars.githubusercontent.com/u/4001727?v=4)](https://github.com/rodrigopaco1986 "rodrigopaco1986 (13 commits)")[![matthewnessworthy](https://avatars.githubusercontent.com/u/5653887?v=4)](https://github.com/matthewnessworthy "matthewnessworthy (1 commits)")

---

Tags

laraveldatefilterdaterangenova

### Embed Badge

![Health badge](/badges/rpj-daterangepicker/health.svg)

```
[![Health](https://phpackages.com/badges/rpj-daterangepicker/health.svg)](https://phpackages.com/packages/rpj-daterangepicker)
```

###  Alternatives

[ampeco/nova-date-range-filter

A Laravel Nova date range filter.

35988.8k1](/packages/ampeco-nova-date-range-filter)[pos-lifestyle/laravel-nova-date-range-filter

A Laravel Nova date range filter.

16179.1k](/packages/pos-lifestyle-laravel-nova-date-range-filter)[marshmallow/nova-date-range-filter

A Laravel Nova date range filter.

12228.5k](/packages/marshmallow-nova-date-range-filter)[outl1ne/nova-detached-filters

This Laravel Nova package allows you to detach filters from the filter dropdown

64343.5k](/packages/outl1ne-nova-detached-filters)[outl1ne/nova-input-filter

An input filter for Laravel Nova

24822.7k](/packages/outl1ne-nova-input-filter)[suenerds/nova-searchable-belongs-to-filter

Searchable Nova filter for belongsTo relationships.

29516.9k](/packages/suenerds-nova-searchable-belongs-to-filter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
