PHPackages                             marshmallow/nova-date-range-field - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. marshmallow/nova-date-range-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marshmallow/nova-date-range-field
=================================

A Laravel Nova field.

5.0.0(10mo ago)310.7k↑60.4%3MITCSSPHP ^8.3

Since Feb 23Pushed 3w ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/nova-date-range-field)[ Packagist](https://packagist.org/packages/marshmallow/nova-date-range-field)[ RSS](/packages/marshmallow-nova-date-range-field/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (7)Dependencies (1)Versions (10)Used By (0)

[![alt text](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67 "marshmallow.")](https://camo.githubusercontent.com/f5450f299f5713ce2f04dd5a1ba7ce9960ed4568b3574e4c4ee3cddc75477253/68747470733a2f2f6d617273686d616c6c6f772e6465762f63646e2f6d656469612f6c6f676f2d7265642d3233377834362e706e67)

Date Range Field for Laravel Nova
=================================

[](#date-range-field-for-laravel-nova)

[![Latest Version on Packagist](https://camo.githubusercontent.com/08719664a6ca371d597e0665065f7fae3ccc96c3854ea30cc294c11192f2fa9e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617273686d616c6c6f772f6e6f76612d646174652d72616e67652d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-date-range-field)[![Total Downloads](https://camo.githubusercontent.com/ad33dc086ced09bf195ff516588b599017b42e8e1fb11b9bb91872b3e83b0186/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617273686d616c6c6f772f6e6f76612d646174652d72616e67652d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/marshmallow/nova-date-range-field)

A Laravel Nova field that provides a date range picker (powered by [flatpickr](https://flatpickr.js.org/)). It can store a range across two model attributes (a "from" and a "till"), as a single value, or as JSON.

Installation
------------

[](#installation)

Install the package via Composer in your Nova project:

```
composer require marshmallow/nova-date-range-field
```

The field's assets are registered automatically through `Marshmallow\NovaDateRangeField\FieldServiceProvider` (Laravel package auto-discovery), so there is nothing else to publish or configure.

Usage
-----

[](#usage)

Use the `DateRange` field on a Nova resource and define the names of the `from` and `till` attributes together with the label. If no fields are set, the string value is stored in the database column of the field's attribute.

```
use Marshmallow\NovaDateRangeField\DateRange;

public function fields(Request $request)
{
    return [
        DateRange::make(__('Access Date'), ['from', 'till']),
        // OR
        DateRange::make(__('Access Date'))
            ->fields('from', 'till'),
    ];
}
```

### flatpickr options

[](#flatpickr-options)

Additional [flatpickr options](https://flatpickr.js.org/options/) can be passed through the `options` array. These overwrite the field's default options (`weekNumbers`, `defaultHour`, `defaultMinute`).

```
DateRange::make(__('Date range'))
    ->fields('from', 'till')
    ->options([
        'defaultHour' => 0,
        'defaultMinute' => 0,
    ]),
```

### Field options

[](#field-options)

The available chainable options (with their default behaviour) are:

```
->modeType('range')   // Set the picker mode ('range' or 'single')
->range()             // Range mode (default)
->single()            // Single date mode
->twelveHourTime()    // Twelve hour time display
->enableSeconds()     // Enable seconds in the time picker
->separator('-')      // Separator shown between the from/till values
->firstDayOfWeek(1)   // First day of the week
->enableTime()        // Enable the time picker
->dateFormat('Y-m-d') // flatpickr date format
->placeholder('date range')
->saveAsJSON()        // Store the value as JSON instead of separate columns
```

When `saveAsJSON()` is used (or when the field's attribute is cast to `array` on the model), the range is stored as JSON on a single attribute instead of being split across the `from` and `till` columns.

Credits
-------

[](#credits)

- [Marshmallow](https://github.com/marshmallow-packages)
- [All Contributors](https://github.com/marshmallow-packages/nova-date-range-field/contributors)

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please report security vulnerabilities by email rather than via the public issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see the [License File](LICENSE.md) for more information.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance77

Regular maintenance activity

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 61.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 ~130 days

Recently: every ~228 days

Total

8

Last Release

309d ago

Major Versions

v1.x-dev → 5.0.02025-08-28

PHP version history (2 changes)v1.0.0PHP ^7.3|^8.0

5.0.0PHP ^8.3

### Community

Maintainers

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

---

Top Contributors

[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (13 commits)")[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (7 commits)")[![shuvroroy](https://avatars.githubusercontent.com/u/21066418?v=4)](https://github.com/shuvroroy "shuvroroy (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/marshmallow-nova-date-range-field/health.svg)

```
[![Health](https://phpackages.com/badges/marshmallow-nova-date-range-field/health.svg)](https://phpackages.com/packages/marshmallow-nova-date-range-field)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3453.7M8](/packages/optimistdigital-nova-multiselect-field)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

52178.7k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17186.3k1](/packages/murdercode-nova4-tinymce-editor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)[wemersonrv/input-mask

A Laravel Nova custom field text with masks on input

1198.4k](/packages/wemersonrv-input-mask)

PHPackages © 2026

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