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.3.6 to 1.4.0

3

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
[1.4.0] - 2019-10-22
* Fix minDate, maxDate, disableDates and value (gotoDate) of input now respects format parameter.
[1.3.6] - 2019-10-22

@@ -5,0 +8,0 @@ * New options `onMonthsChange` and `onYearsChange` - Events fire when months or years select changed.

12

lightpick.js

@@ -137,4 +137,4 @@ /**

if (opts.disableDates[i] instanceof Array || Object.prototype.toString.call(opts.disableDates[i]) === '[object Array]') {
var _from = moment(opts.disableDates[i][0]),
_to = moment(opts.disableDates[i][1]);
var _from = moment(opts.disableDates[i][0], opts.format),
_to = moment(opts.disableDates[i][1], opts.format);

@@ -145,3 +145,3 @@ if (_from.isValid() && _to.isValid() && date.isBetween(_from, _to, 'day', '[]')){

}
else if (moment(opts.disableDates[i]).isValid() && moment(opts.disableDates[i]).isSame(date, 'day')) {
else if (moment(opts.disableDates[i], opts.format).isValid() && moment(opts.disableDates[i], opts.format).isSame(date, 'day')) {
day.className.push('is-disabled');

@@ -888,5 +888,5 @@ }

opts.minDate = opts.minDate && moment(opts.minDate).isValid() ? moment(opts.minDate) : null;
opts.minDate = opts.minDate && moment(opts.minDate, opts.format).isValid() ? moment(opts.minDate, opts.format) : null;
opts.maxDate = opts.maxDate && moment(opts.maxDate).isValid() ? moment(opts.maxDate) : null;
opts.maxDate = opts.maxDate && moment(opts.maxDate, opts.format).isValid() ? moment(opts.maxDate, opts.format) : null;

@@ -978,3 +978,3 @@ if (opts.lang === 'auto') {

{
var date = moment(date);
var date = moment(date, this._opts.format);

@@ -981,0 +981,0 @@ if (!date.isValid()) {

{
"name": "lightpick",
"version": "1.3.6",
"version": "1.4.0",
"description": "Javascript date range picker - lightweight, no jQuery",

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

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