Socket
Socket
Sign inDemoInstall

react-calendar

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-calendar - npm Package Compare versions

Comparing version 2.11.1 to 2.11.2

40

dist/Calendar.js

@@ -180,6 +180,9 @@ 'use strict';

}, _this.onChange = function (value) {
var selectRange = _this.props.selectRange;
var _this$props3 = _this.props,
onChange = _this$props3.onChange,
selectRange = _this$props3.selectRange;
var nextValue = void 0;
var callback = void 0;
if (selectRange) {

@@ -196,3 +199,5 @@ var previousValue = _this.state.value;

nextValue = (0, _dates.getValueRange)(_this.valueType, previousValue, value);
(0, _utils.callIfDefined)(_this.props.onChange, nextValue);
callback = function callback() {
return (0, _utils.callIfDefined)(onChange, nextValue);
};
}

@@ -202,6 +207,8 @@ } else {

nextValue = _this.getProcessedValue(value);
(0, _utils.callIfDefined)(_this.props.onChange, nextValue);
callback = function callback() {
return (0, _utils.callIfDefined)(onChange, nextValue);
};
}
_this.setState({ value: nextValue });
_this.setState({ value: nextValue }, callback);
}, _this.onMouseOver = function (value) {

@@ -285,5 +292,4 @@ _this.setState({ hover: value });

nextValue = nextProps.value;
var _props = this.props,
locale = _props.locale,
value = _props.value;
var locale = this.props.locale;
var value = this.state.value;

@@ -343,9 +349,9 @@

value: function renderContent() {
var _props2 = this.props,
calendarType = _props2.calendarType,
maxDate = _props2.maxDate,
minDate = _props2.minDate,
renderChildren = _props2.renderChildren,
tileClassName = _props2.tileClassName,
tileContent = _props2.tileContent;
var _props = this.props,
calendarType = _props.calendarType,
maxDate = _props.maxDate,
minDate = _props.minDate,
renderChildren = _props.renderChildren,
tileClassName = _props.tileClassName,
tileContent = _props.tileContent;
var _state = this.state,

@@ -430,5 +436,5 @@ activeStartDate = _state.activeStartDate,

value: function render() {
var _props3 = this.props,
className = _props3.className,
selectRange = _props3.selectRange;
var _props2 = this.props,
className = _props2.className,
selectRange = _props2.selectRange;
var value = this.state.value;

@@ -435,0 +441,0 @@ var onMouseOut = this.onMouseOut;

{
"name": "react-calendar",
"version": "2.11.1",
"version": "2.11.2",
"description": "A component for picking dates or date periods for your React application.",

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

@@ -141,3 +141,4 @@ import React, { Component } from 'react';

const { locale: nextLocale, value: nextValue } = nextProps;
const { locale, value } = this.props;
const { locale } = this.props;
const { value } = this.state;

@@ -258,5 +259,6 @@ if (nextLocale !== locale) {

onChange = (value) => {
const { selectRange } = this.props;
const { onChange, selectRange } = this.props;
let nextValue;
let callback;
if (selectRange) {

@@ -274,3 +276,3 @@ const { value: previousValue } = this.state;

nextValue = getValueRange(this.valueType, previousValue, value);
callIfDefined(this.props.onChange, nextValue);
callback = () => callIfDefined(onChange, nextValue);
}

@@ -280,6 +282,6 @@ } else {

nextValue = this.getProcessedValue(value);
callIfDefined(this.props.onChange, nextValue);
callback = () => callIfDefined(onChange, nextValue);
}
this.setState({ value: nextValue });
this.setState({ value: nextValue }, callback);
}

@@ -286,0 +288,0 @@

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