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.41.1 to 0.43.0

src/stylesheets/datepicker-cssmodules.scss

8

lib/calendar.js

@@ -7,6 +7,2 @@ 'use strict';

var _find = require('lodash/find');
var _find2 = _interopRequireDefault(_find);
var _year_dropdown = require('./year_dropdown');

@@ -42,3 +38,3 @@

var classNames = (element.className || '').split(/\s+/);
return !!(0, _find2.default)(DROPDOWN_FOCUS_CLASSNAMES, function (testClassname) {
return DROPDOWN_FOCUS_CLASSNAMES.some(function (testClassname) {
return classNames.indexOf(testClassname) >= 0;

@@ -62,2 +58,3 @@ });

includeDates: _react2.default.PropTypes.array,
inline: _react2.default.PropTypes.bool,
locale: _react2.default.PropTypes.string,

@@ -331,2 +328,3 @@ maxDate: _react2.default.PropTypes.object,

includeDates: this.props.includeDates,
inline: this.props.inline,
fixedHeight: this.props.fixedHeight,

@@ -333,0 +331,0 @@ filterDate: this.props.filterDate,

@@ -15,6 +15,2 @@ 'use strict';

var _defer = require('lodash/defer');
var _defer2 = _interopRequireDefault(_defer);
var _tether_component = require('./tether_component');

@@ -134,6 +130,7 @@

getInitialState: function getInitialState() {
var defaultPreSelection = this.props.openToDate ? (0, _moment2.default)(this.props.openToDate) : (0, _moment2.default)();
return {
open: false,
preventFocus: false,
preSelection: this.props.selected ? (0, _moment2.default)(this.props.selected) : (0, _moment2.default)()
preSelection: this.props.selected ? (0, _moment2.default)(this.props.selected) : defaultPreSelection
};

@@ -172,5 +169,5 @@ },

this.cancelFocusInput();
this.inputFocusTimeout = (0, _defer2.default)(function () {
this.inputFocusTimeout = window.setTimeout(function () {
return _this.setFocus();
});
}, 1);
},

@@ -331,2 +328,3 @@ handleDropdownFocus: function handleDropdownFocus() {

includeDates: this.props.includeDates,
inline: this.props.inline,
peekNextMonth: this.props.peekNextMonth,

@@ -390,3 +388,3 @@ showMonthDropdown: this.props.showMonthDropdown,

if (this.props.inline) {
if (this.props.inline && !this.props.withPortal) {
return calendar;

@@ -399,3 +397,3 @@ }

null,
_react2.default.createElement(
!this.props.inline ? _react2.default.createElement(
'div',

@@ -405,4 +403,4 @@ { className: 'react-datepicker__input-container' },

this.renderClearButton()
),
this.state.open ? _react2.default.createElement(
) : null,
this.state.open || this.props.inline ? _react2.default.createElement(
'div',

@@ -409,0 +407,0 @@ { className: 'react-datepicker__portal' },

@@ -26,2 +26,3 @@ 'use strict';

highlightDates: _react2.default.PropTypes.array,
inline: _react2.default.PropTypes.bool,
month: _react2.default.PropTypes.number,

@@ -57,3 +58,3 @@ onClick: _react2.default.PropTypes.func,

isKeyboardSelected: function isKeyboardSelected() {
return !this.isSameDay(this.props.selected) && this.isSameDay(this.props.preSelection);
return !this.props.inline && !this.isSameDay(this.props.selected) && this.isSameDay(this.props.preSelection);
},

@@ -60,0 +61,0 @@ isDisabled: function isDisabled() {

@@ -19,6 +19,2 @@ 'use strict';

var _range = require('lodash/range');
var _range2 = _interopRequireDefault(_range);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -106,3 +102,3 @@

var localeData = _moment2.default.localeData(this.props.locale);
var monthNames = (0, _range2.default)(0, 12).map(function (M) {
var monthNames = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(function (M) {
return localeData.months((0, _moment2.default)({ M: M }));

@@ -109,0 +105,0 @@ });

@@ -30,2 +30,3 @@ 'use strict';

includeDates: _react2.default.PropTypes.array,
inline: _react2.default.PropTypes.bool,
maxDate: _react2.default.PropTypes.object,

@@ -85,2 +86,3 @@ minDate: _react2.default.PropTypes.object,

includeDates: this.props.includeDates,
inline: this.props.inline,
highlightDates: this.props.highlightDates,

@@ -87,0 +89,0 @@ selectingDate: this.props.selectingDate,

@@ -27,2 +27,3 @@ 'use strict';

includeDates: _react2.default.PropTypes.array,
inline: _react2.default.PropTypes.bool,
maxDate: _react2.default.PropTypes.object,

@@ -73,2 +74,3 @@ minDate: _react2.default.PropTypes.object,

includeDates: _this.props.includeDates,
inline: _this.props.inline,
highlightDates: _this.props.highlightDates,

@@ -75,0 +77,0 @@ selectingDate: _this.props.selectingDate,

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

"description": "A simple and reusable datepicker component for React",
"version": "0.41.1",
"version": "0.43.0",
"license": "MIT",

@@ -14,3 +14,4 @@ "homepage": "https://github.com/Hacker0x01/react-datepicker",

"dist",
"lib"
"lib",
"src/stylesheets"
],

@@ -17,0 +18,0 @@ "keywords": [

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