PHPackages                             mlsolutions/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. mlsolutions/daterangepicker

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

mlsolutions/daterangepicker
===========================

A simple Date Range filter for Laravel Nova 4.

v1.0.2(3mo ago)0598↓69.3%MITPHPPHP &gt;=8.1

Since Feb 27Pushed 3mo agoCompare

[ Source](https://github.com/ml-solutions-ltda/simple-daterange-picker)[ Packagist](https://packagist.org/packages/mlsolutions/daterangepicker)[ Fund](https://www.buymeacoffee.com/rodrigopaco)[ RSS](/packages/mlsolutions-daterangepicker/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)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 mlsolutions/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 MlSolutions\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 MlSolutions\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 MlSolutions\Daterangepicker\Daterangepicker;
use MlSolutions\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 MlSolutions\Daterangepicker\Daterangepicker;
use MlSolutions\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()->startOfYear()),
    ];
}
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance78

Regular maintenance activity

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.3% 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 ~0 days

Total

3

Last Release

115d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b895f8c44bd74d8ad19241803acb2f5763db593c608314de8ec07700e79796eb?d=identicon)[luissobrinho](/maintainers/luissobrinho)

---

Top Contributors

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

---

Tags

laraveldatefilterdaterangenova

### Embed Badge

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

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

###  Alternatives

[ampeco/nova-date-range-filter

A Laravel Nova date range filter.

351.0M1](/packages/ampeco-nova-date-range-filter)[marshmallow/nova-date-range-filter

A Laravel Nova date range filter.

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

A Laravel Nova date range filter.

16180.9k](/packages/pos-lifestyle-laravel-nova-date-range-filter)[outl1ne/nova-detached-filters

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

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

An input filter for Laravel Nova

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

Searchable Nova filter for belongsTo relationships.

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

PHPackages © 2026

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