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.2.1 to 2.3.0

index.d.ts

4

build/Calendar.js

@@ -123,4 +123,2 @@ 'use strict';

}, _this.onChange = function (value) {
_this.setState({ value: value });
var onChange = _this.props.onChange;

@@ -462,3 +460,3 @@

renderChildren: _propTypes2.default.func,
returnValue: _propTypes2.default.oneOf(['start', 'end', 'range']).isRequired,
returnValue: _propTypes2.default.oneOf(['start', 'end', 'range']),
showNavigation: _propTypes2.default.bool,

@@ -465,0 +463,0 @@ showNeighboringMonth: _propTypes2.default.bool,

@@ -85,6 +85,8 @@ 'use strict';

var className = 'react-calendar__navigation';
return _react2.default.createElement(
'div',
{
className: 'react-calendar__navigation',
className: className,
style: { display: 'flex' }

@@ -95,3 +97,3 @@ },

{
className: 'react-calendar__navigation__arrow',
className: className + '__arrow ' + className + '__prev2-button',
disabled: this.prev2ButtonDisabled,

@@ -106,3 +108,3 @@ onClick: this.onClickPrevious2,

{
className: 'react-calendar__navigation__arrow',
className: className + '__arrow ' + className + '__prev-button',
disabled: this.prevButtonDisabled,

@@ -128,3 +130,3 @@ onClick: this.onClickPrevious,

{
className: 'react-calendar__navigation__arrow',
className: className + '__arrow ' + className + '__next-button',
disabled: this.nextButtonDisabled,

@@ -139,3 +141,3 @@ onClick: this.onClickNext,

{
className: 'react-calendar__navigation__arrow',
className: className + '__arrow ' + className + '__next2-button',
disabled: this.next2ButtonDisabled,

@@ -142,0 +144,0 @@ onClick: this.onClickNext2,

@@ -22,3 +22,3 @@ 'use strict';

if (typeof date === 'string' && !isNaN(year)) {
if (typeof date === 'string' && !Number.isNaN(year)) {
return year;

@@ -25,0 +25,0 @@ }

{
"name": "react-calendar",
"version": "2.2.1",
"version": "2.3.0",
"description": "A component for picking dates or date periods for your React application.",
"main": "build/entry.js",
"types": "./index.d.ts",
"es6": "src/entry.js",

@@ -35,2 +36,8 @@ "scripts": {

},
"contributors": [
{
"name": "Kevin Kipp",
"email": "kevin.kipp@gmail.com"
}
],
"license": "MIT",

@@ -45,2 +52,3 @@ "dependencies": {

"devDependencies": {
"@types/react": "^16.0.22",
"babel-cli": "^6.26.0",

@@ -70,2 +78,3 @@ "babel-core": "^6.26.0",

"README.md",
"index.d.ts",
"build/",

@@ -72,0 +81,0 @@ "src/"

@@ -64,2 +64,3 @@ ![downloads](https://img.shields.io/npm/dt/react-calendar.svg) ![build](https://img.shields.io/travis/wojtekmaj/react-calendar.svg) ![dependencies](https://img.shields.io/david/wojtekmaj/react-calendar.svg

onChange={this.onChange}
value={this.state.date}
/>

@@ -66,0 +67,0 @@ </div>

@@ -233,4 +233,2 @@ import React, { Component } from 'react';

onChange = (value) => {
this.setState({ value });
const { onChange } = this.props;

@@ -245,3 +243,5 @@ if (onChange) {

const { setView, valueType } = this;
const { calendarType, maxDate, minDate, renderChildren, value } = this.props;
const {
calendarType, maxDate, minDate, renderChildren, value,
} = this.props;
const { activeStartDate, view } = this.state;

@@ -363,3 +363,3 @@

renderChildren: PropTypes.func,
returnValue: PropTypes.oneOf(['start', 'end', 'range']).isRequired,
returnValue: PropTypes.oneOf(['start', 'end', 'range']),
showNavigation: PropTypes.bool,

@@ -366,0 +366,0 @@ showNeighboringMonth: PropTypes.bool,

@@ -97,5 +97,7 @@ import React, { Component } from 'react';

const className = 'react-calendar__navigation';
return (
<div
className="react-calendar__navigation"
className={className}
style={{ display: 'flex' }}

@@ -106,3 +108,3 @@ >

<button
className="react-calendar__navigation__arrow"
className={`${className}__arrow ${className}__prev2-button`}
disabled={this.prev2ButtonDisabled}

@@ -116,3 +118,3 @@ onClick={this.onClickPrevious2}

<button
className="react-calendar__navigation__arrow"
className={`${className}__arrow ${className}__prev-button`}
disabled={this.prevButtonDisabled}

@@ -134,3 +136,3 @@ onClick={this.onClickPrevious}

<button
className="react-calendar__navigation__arrow"
className={`${className}__arrow ${className}__next-button`}
disabled={this.nextButtonDisabled}

@@ -145,3 +147,3 @@ onClick={this.onClickNext}

<button
className="react-calendar__navigation__arrow"
className={`${className}__arrow ${className}__next2-button`}
disabled={this.next2ButtonDisabled}

@@ -148,0 +150,0 @@ onClick={this.onClickNext2}

@@ -26,3 +26,5 @@ import React, { Component } from 'react';

const { end, start } = this;
const { maxDate, minDate, onClick, renderChildren, value, valueType } = this.props;
const {
maxDate, minDate, onClick, renderChildren, value, valueType,
} = this.props;

@@ -29,0 +31,0 @@ const decadeProps = {

@@ -12,3 +12,5 @@ import React from 'react';

const Year = ({ active, date, hasActive, maxDate, minDate, onClick, renderChildren, year }) => (
const Year = ({
active, date, hasActive, maxDate, minDate, onClick, renderChildren, year,
}) => (
<button

@@ -15,0 +17,0 @@ className={[

@@ -23,3 +23,5 @@ import React, { Component } from 'react';

const { end, start } = this;
const { maxDate, minDate, onClick, renderChildren, value, valueType } = this.props;
const {
maxDate, minDate, onClick, renderChildren, value, valueType,
} = this.props;

@@ -26,0 +28,0 @@ const yearProps = {

@@ -6,3 +6,5 @@ import React from 'react';

const Flex = ({ children, className, count, offset, wrap }) => (
const Flex = ({
children, className, count, offset, wrap,
}) => (
<div

@@ -9,0 +11,0 @@ className={className}

@@ -14,3 +14,5 @@ import React from 'react';

const Day = ({ active, currentMonthIndex, date, maxDate, minDate, onClick, renderChildren }) => (
const Day = ({
active, currentMonthIndex, date, maxDate, minDate, onClick, renderChildren,
}) => (
<button

@@ -17,0 +19,0 @@ className={[

@@ -67,4 +67,6 @@ import React, { Component } from 'react';

render() {
const { start, end, year, monthIndex } = this;
const {
start, end, year, monthIndex,
} = this;
const {
maxDate,

@@ -71,0 +73,0 @@ minDate,

@@ -14,3 +14,3 @@ /* Simple getters - getting a property of a given point in time */

if (typeof date === 'string' && !isNaN(year)) {
if (typeof date === 'string' && !Number.isNaN(year)) {
return year;

@@ -17,0 +17,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