react-datetime-picker
Advanced tools
Comparing version 3.4.1 to 3.4.2
@@ -29,3 +29,4 @@ "use strict"; | ||
var _excluded = ["calendarClassName", "className", "maxDetail", "onChange", "value"], | ||
_excluded2 = ["clockClassName", "className", "maxDetail", "onChange", "value"]; | ||
_excluded2 = ["clockClassName", "className", "maxDetail", "onChange", "value"], | ||
_excluded3 = ["onChange"]; | ||
@@ -443,11 +444,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var eventProps = this.eventProps; | ||
var _this$props6 = this.props, | ||
className = _this$props6.className, | ||
disabled = _this$props6.disabled; | ||
var _this$state4 = this.state, | ||
isCalendarOpen = _this$state4.isCalendarOpen, | ||
isClockOpen = _this$state4.isClockOpen; | ||
var isOpen = this.state.isOpen; | ||
var onChange = eventProps.onChange, | ||
eventPropsWithoutOnChange = _objectWithoutProperties(eventProps, _excluded3); | ||
return /*#__PURE__*/_react["default"].createElement("div", _extends({ | ||
className: (0, _mergeClassNames["default"])(baseClassName, "".concat(baseClassName, "--").concat(isCalendarOpen || isClockOpen ? 'open' : 'closed'), "".concat(baseClassName, "--").concat(disabled ? 'disabled' : 'enabled'), className) | ||
}, this.eventProps, { | ||
className: (0, _mergeClassNames["default"])(baseClassName, "".concat(baseClassName, "--").concat(isOpen ? 'open' : 'closed'), "".concat(baseClassName, "--").concat(disabled ? 'disabled' : 'enabled'), className) | ||
}, eventPropsWithoutOnChange, { | ||
onFocus: this.onFocus, | ||
@@ -454,0 +458,0 @@ ref: function ref(_ref) { |
{ | ||
"name": "react-datetime-picker", | ||
"version": "3.4.1", | ||
"version": "3.4.2", | ||
"description": "A date range picker for your React app.", | ||
@@ -5,0 +5,0 @@ "main": "dist/entry.js", |
@@ -378,5 +378,8 @@ import React, { PureComponent } from 'react'; | ||
render() { | ||
const { eventProps } = this; | ||
const { className, disabled } = this.props; | ||
const { isCalendarOpen, isClockOpen } = this.state; | ||
const { isOpen } = this.state; | ||
const { onChange, ...eventPropsWithoutOnChange } = eventProps; | ||
return ( | ||
@@ -386,7 +389,7 @@ <div | ||
baseClassName, | ||
`${baseClassName}--${isCalendarOpen || isClockOpen ? 'open' : 'closed'}`, | ||
`${baseClassName}--${isOpen ? 'open' : 'closed'}`, | ||
`${baseClassName}--${disabled ? 'disabled' : 'enabled'}`, | ||
className, | ||
)} | ||
{...this.eventProps} | ||
{...eventPropsWithoutOnChange} | ||
onFocus={this.onFocus} | ||
@@ -393,0 +396,0 @@ ref={(ref) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199757
4775