PHPackages                             soderlind/date-range-ninja-forms - 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. soderlind/date-range-ninja-forms

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

soderlind/date-range-ninja-forms
================================

Date Range field for Ninja Forms

1.1.0(5y ago)1143[5 issues](https://github.com/soderlind/date-range-ninja-forms/issues)GPL-2.0-onlyPHP

Since Apr 13Pushed 4y ago3 watchersCompare

[ Source](https://github.com/soderlind/date-range-ninja-forms)[ Packagist](https://packagist.org/packages/soderlind/date-range-ninja-forms)[ Docs](https://github.com/soderlind/date-range-ninja-forms)[ Fund](https://paypal.me/PerSoderlind)[ RSS](/packages/soderlind-date-range-ninja-forms/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

Date Range field for Ninja Forms
================================

[](#date-range-field-for-ninja-forms)

[![Latest Stable Version](https://camo.githubusercontent.com/a5b6f6b1b516e2028b4e188d64562653c649ccbb0d11e3bcfe384b83d8cdb39e/68747470733a2f2f706f7365722e707567782e6f72672f736f6465726c696e642f646174652d72616e67652d6e696e6a612d666f726d732f76)](//packagist.org/packages/soderlind/date-range-ninja-forms)

[Description](#description) | [Installation](#installation) | [Screenshots](#screenshots) | [Filters](#filters) | [Changelog](#changelog) | [Credits](#credits) | [Copyright and License](#copyright-and-license)

Description
-----------

[](#description)

Add a Date Range field to your Ninja Forms.

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

[](#installation)

1. Upload the plugin files to the `/wp-content/plugins/data-range-ninja-forms` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress
3. Use Ninja Forms to add the Date Range field.

Screenshots
-----------

[](#screenshots)

### 1. Settings

[](#1-settings)

[![](assets/screenshot-1.png)](assets/screenshot-1.png)

### 2. Using Ninja Forms to add the Date Range field.

[](#2-using-ninja-forms-to-add-the-date-range-field)

[![](assets/screenshot-2.gif)](assets/screenshot-2.gif)

### 3. Date Range at the front-end.

[](#3-date-range-at-the-front-end)

[![](assets/screenshot-3.gif)](assets/screenshot-3.gif)

Filters
-------

[](#filters)

Add the filters to your child theme functions.php

### `date_range_lang`

[](#date_range_lang)

Override the value returned from get\_locale().

E.g. if using Polylang, add:

```
add_filter( 'date_range_lang', function( $locale ) {
	if ( function_exists( 'pll_current_language' ) ) {
		$locale = pll_current_language( 'locale' );
	}
	return $locale;
} );
```

### `date_range_dropdowns`

[](#date_range_dropdowns)

Enable dropdowns for months, years.

If `maxYear` is `null` then `maxYear` will be equal to `(new Date()).getFullYear()`.

```
add_filter( 'date_range_dropdowns', function( $dropdowns ) {

	$dropdowns = [
		'minYear' => 2020,
		'maxYear' => 2030,
		'months'  => false,
		'years'   => true, // show dropdown for years.
	];

	return $dropdowns;
} );
```

### `date_range_buttontext`

[](#date_range_buttontext)

Text for buttons.

```
add_filter( 'date_range_buttontext', function( $buttontext ) {

	$buttontext = [
		'apply'         => 'Apply',
		'cancel'        => 'Cancel',
		'previousMonth' => '',
		'nextMonth'     => '',
	];

	return $buttontext;
} );
```

See also
--------

[](#see-also)

I've created an [iCalendar](https://github.com/soderlind/icalendar-ninja-form) add-on for Ninja Forms.

Changelog
---------

[](#changelog)

### 1.1.0

[](#110)

- Update to latest version of [Litepicker](https://github.com/wakirin/Litepicker)

### 1.0.2

[](#102)

- Lint source code using PHP CodeSniffer and [Rome](https://rome.tools/).

### 1.0.1

[](#101)

- Add date setting field

### 1.0.0

[](#100)

- Refactor

### 0.1.0

[](#010)

- [Custom validation](https://github.com/soderlind/date-range-ninja-forms/blob/master/js/date-range.js#L29-L106) for required fields
- Add moment.js
- Refactor code, using ES2019 Class Fields.

### 0.0.7

[](#007)

- Refactor JavaScript to ES6.

### 0.0.6

[](#006)

- Fix breaking bug

### 0.0.5

[](#005)

- Add more settings.
- Add [filters](#filters): `date_range_lang`, `date_range_dropdowns` and `date_range_buttontext`.
- Add `languages/date-range-ninja-forms.pot`

### 0.0.4

[](#004)

- Replace Lightpick, no longer maintained, with [Litepicker](https://github.com/wakirin/Litepicker)

### 0.0.3

[](#003)

- In Ninja Forms builder, select WP Settings date.

### 0.0.2

[](#002)

- Set date format in Ninja Form builder

### 0.0.1

[](#001)

- Initial release.

Credits
-------

[](#credits)

Date Range field for Ninja Forms uses [Litepicker](https://github.com/wakirin/Litepicker). The Litepicker has a MIT licence and is Copyright 2019 [Rinat G](https://github.com/wakirin/).

Copyright and License
---------------------

[](#copyright-and-license)

Date Range field for Ninja Forms is copyright 2020 Per Soderlind

Date Range field for Ninja Forms is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

Date Range field for Ninja Forms is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see .

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.5% 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 ~4 days

Total

3

Last Release

1852d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1649452?v=4)[Per Søderlind](/maintainers/soderlind)[@soderlind](https://github.com/soderlind)

---

Top Contributors

[![soderlind](https://avatars.githubusercontent.com/u/1649452?v=4)](https://github.com/soderlind "soderlind (64 commits)")[![digitaldonkey](https://avatars.githubusercontent.com/u/444718?v=4)](https://github.com/digitaldonkey "digitaldonkey (1 commits)")

### Embed Badge

![Health badge](/badges/soderlind-date-range-ninja-forms/health.svg)

```
[![Health](https://phpackages.com/badges/soderlind-date-range-ninja-forms/health.svg)](https://phpackages.com/packages/soderlind-date-range-ninja-forms)
```

###  Alternatives

[roave/psr-container-doctrine

Doctrine Factories for PSR-11 Containers

99776.7k19](/packages/roave-psr-container-doctrine)[wyrihaximus/json-throwable

📠 JSON encode and decode throwables and exceptions

12271.9k5](/packages/wyrihaximus-json-throwable)

PHPackages © 2026

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