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

react-datepicker

Package Overview
Dependencies
Maintainers
2
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-datepicker - npm Package Compare versions

Comparing version 0.52.0 to 0.53.0

27

lib/datepicker.js

@@ -80,3 +80,4 @@ 'use strict';

monthsShown: 1,
withPortal: false
withPortal: false,
shouldCloseOnSelect: true
};

@@ -153,3 +154,5 @@ }

_this.handleCalendarClickOutside = function (event) {
_this.setOpen(false);
if (!_this.props.inline) {
_this.setOpen(false);
}
_this.props.onClickOutside(event);

@@ -185,3 +188,5 @@ if (_this.props.withPortal) {

_this.setSelected(date, event);
if (!_this.props.inline) {
if (!_this.props.shouldCloseOnSelect) {
_this.setPreSelection(date);
} else if (!_this.props.inline) {
_this.setOpen(false);

@@ -251,2 +256,3 @@ }

_this.handleSelect(copy, event);
!_this.props.shouldCloseOnSelect && _this.setPreSelection(copy);
} else {

@@ -260,4 +266,3 @@ _this.setOpen(false);

_this.setOpen(false);
}
if (!_this.props.disabledKeyboardNavigation) {
} else if (!_this.props.disabledKeyboardNavigation) {
var newSelection = void 0;

@@ -399,2 +404,11 @@ switch (eventKey) {

_createClass(DatePicker, [{
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var currentMonth = this.props.selected && this.props.selected.month();
var nextMonth = nextProps.selected && nextProps.selected.month();
if (this.props.inline && currentMonth !== nextMonth) {
this.setPreSelection(nextProps.selected);
}
}
}, {
key: 'componentWillUnmount',

@@ -513,4 +527,5 @@ value: function componentWillUnmount() {

withPortal: _propTypes2.default.bool,
yearDropdownItemNumber: _propTypes2.default.number
yearDropdownItemNumber: _propTypes2.default.number,
shouldCloseOnSelect: _propTypes2.default.bool
};
exports.default = DatePicker;

@@ -72,5 +72,8 @@ 'use strict';

if (!highlightDates) {
return _defineProperty({}, defaultClassName, false);
}
var classNames = {};
for (var i = 0, len = highlightDates.length; i < len; i++) {

@@ -80,3 +83,3 @@ var obj = highlightDates[i];

if ((0, _date_utils.isSameDay)(day, obj)) {
return _defineProperty({}, defaultClassName, true);
classNames[defaultClassName] = true;
}

@@ -89,3 +92,3 @@ } else if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object') {

if ((0, _date_utils.isSameDay)(day, arr[k])) {
return _defineProperty({}, keys[0], true);
classNames[keys[0]] = true;
}

@@ -96,2 +99,4 @@ }

}
return classNames;
}, _this.isInRange = function () {

@@ -98,0 +103,0 @@ var _this$props2 = _this.props,

@@ -5,3 +5,3 @@ {

"description": "A simple and reusable datepicker component for React",
"version": "0.52.0",
"version": "0.53.0",
"license": "MIT",

@@ -8,0 +8,0 @@ "homepage": "https://github.com/Hacker0x01/react-datepicker",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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