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.1 to 1.2.2

5

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
[1.2.2] - 2018-08-24
* new callback: onError
Calling when `disabledDatesInRange` is set to `false` and user is select range includes disabled dates.
* minor bug fixes
[1.2.0] - 2018-08-23

@@ -5,0 +10,0 @@ * new option: disabledDatesInRange

36

lightpick.js

@@ -52,2 +52,3 @@ /**

onClose: null,
onError: null,
hoveringTooltip: true,

@@ -326,12 +327,12 @@ hideOnBodyClick: true,

}),
closestPrev = disabledArray.filter(function(d) {
return d.isBefore(opts.startDate);
closestPrev = moment(disabledArray.filter(function(d) {
return moment(d).isBefore(opts.startDate);
}).sort(function(a,b){
return b.isAfter(a);
})[0],
closestNext = disabledArray.filter(function(d) {
return d.isAfter(opts.startDate);
return moment(b).isAfter(moment(a));
})[0]),
closestNext = moment(disabledArray.filter(function(d) {
return moment(d).isAfter(opts.startDate);
}).sort(function(a,b){
return a.isAfter(b);
})[0];
return moment(a).isAfter(moment(b));
})[0]);

@@ -506,10 +507,15 @@ [].forEach.call(days, function(dayCell) {

if (opts.footer) {
var footerMessage = self.el.querySelector('.lightpick__footer-message');
if (footerMessage) {
footerMessage.innerHTML = opts.locale.not_allowed_range;
if (typeof self._opts.onError === 'function') {
self._opts.onError.call(self, 'Invalid range');
}
else {
var footerMessage = self.el.querySelector('.lightpick__footer-message');
setTimeout(function(){
footerMessage.innerHTML = '';
}, 3000);
if (footerMessage) {
footerMessage.innerHTML = opts.locale.not_allowed_range;
setTimeout(function(){
footerMessage.innerHTML = '';
}, 3000);
}
}

@@ -516,0 +522,0 @@ }

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

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

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