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

react-datetime-picker

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-datetime-picker - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

6

dist/DateTimePicker.js

@@ -493,3 +493,5 @@ "use strict";

disabled = _this$props6.disabled;
var isOpen = this.state.isOpen;
var _this$state4 = this.state,
isCalendarOpen = _this$state4.isCalendarOpen,
isClockOpen = _this$state4.isClockOpen;

@@ -500,3 +502,3 @@ var onChange = eventProps.onChange,

return /*#__PURE__*/_react["default"].createElement("div", _extends({
className: (0, _mergeClassNames["default"])(baseClassName, "".concat(baseClassName, "--").concat(isOpen ? 'open' : 'closed'), "".concat(baseClassName, "--").concat(disabled ? 'disabled' : 'enabled'), className)
className: (0, _mergeClassNames["default"])(baseClassName, "".concat(baseClassName, "--").concat(isCalendarOpen || isClockOpen ? 'open' : 'closed'), "".concat(baseClassName, "--").concat(disabled ? 'disabled' : 'enabled'), className)
}, eventPropsWithoutOnChange, {

@@ -503,0 +505,0 @@ onFocus: this.onFocus,

{
"name": "react-datetime-picker",
"version": "4.0.0",
"version": "4.0.1",
"description": "A date range picker for your React app.",

@@ -5,0 +5,0 @@ "main": "dist/entry.js",

@@ -438,3 +438,3 @@ import React, { createRef, PureComponent } from 'react';

const { className, disabled } = this.props;
const { isOpen } = this.state;
const { isCalendarOpen, isClockOpen } = this.state;

@@ -447,3 +447,3 @@ const { onChange, ...eventPropsWithoutOnChange } = eventProps;

baseClassName,
`${baseClassName}--${isOpen ? 'open' : 'closed'}`,
`${baseClassName}--${isCalendarOpen || isClockOpen ? 'open' : 'closed'}`,
`${baseClassName}--${disabled ? 'disabled' : 'enabled'}`,

@@ -450,0 +450,0 @@ className,

@@ -151,2 +151,18 @@ import React, { createRef } from 'react';

it('applies "--open" className to its wrapper when given isCalendarOpen flag', () => {
const { container } = render(<DateTimePicker isCalendarOpen />);
const wrapper = container.firstChild;
expect(wrapper).toHaveClass('react-datetime-picker--open');
});
it('applies "--open" className to its wrapper when given isClockOpen flag', () => {
const { container } = render(<DateTimePicker isClockOpen />);
const wrapper = container.firstChild;
expect(wrapper).toHaveClass('react-datetime-picker--open');
});
it('applies calendarClassName to the calendar when given a string', () => {

@@ -153,0 +169,0 @@ const calendarClassName = 'testClassName';

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