Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightpick

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightpick - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

docs/demo.js

3

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
[1.2.7] - 2018-12-10
* fix bug when used both options `repick` and `minDays` (on repick date `minDays` was ignored)
[1.2.6] - 2018-11-08

@@ -5,0 +8,0 @@ * new option: orientation

@@ -173,2 +173,21 @@ /**

if (opts.repick && (opts.minDays || opts.maxDays) && opts.startDate && opts.endDate) {
var tempStartDate = moment(opts.repickTrigger == opts.field ? opts.endDate : opts.startDate);
if (opts.minDays) {
if (date.isBetween(moment(tempStartDate).subtract(opts.minDays - 1, 'day'), moment(tempStartDate).add(opts.minDays - 1, 'day'), 'day')) {
day.className.push('is-disabled');
}
}
if (opts.maxDays) {
if (date.isSameOrBefore(moment(tempStartDate).subtract(opts.maxDays, 'day'), 'day')) {
day.className.push('is-disabled');
}
else if (date.isSameOrAfter(moment(tempStartDate).add(opts.maxDays, 'day'), 'day')) {
day.className.push('is-disabled');
}
}
}
if (date.isSame(new Date(), 'day')) {

@@ -175,0 +194,0 @@ day.className.push('is-today');

2

package.json
{
"name": "lightpick",
"version": "1.2.6",
"version": "1.2.7",
"description": "Javascript date range picker - lightweight, no jQuery",

@@ -5,0 +5,0 @@ "main": "lightpick.js",

@@ -18,3 +18,3 @@ [![npm version](https://badge.fury.io/js/lightpick.svg)](https://www.npmjs.com/package/lightpick) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wakirin/lightpick/blob/master/LICENSE)

* Moment.js
* [moment.js](https://www.npmjs.com/package/moment)

@@ -37,3 +37,3 @@ ## Installation

```
```html
<input type="text" id="datepicker"/>

@@ -44,3 +44,3 @@ ```

```
```html
<link rel="stylesheet" type="text/css" href="css/lightpick.css">

@@ -47,0 +47,0 @@ ...

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc