Socket
Socket
Sign inDemoInstall

react-day-picker

Package Overview
Dependencies
Maintainers
1
Versions
247
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-day-picker - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

CHANGELOG.md

102

lib/DayPicker.js

@@ -253,23 +253,25 @@ "use strict";

value: function handleKeyDown(e) {
var _this5 = this;
e.persist();
var _props4 = this.props;
var canChangeMonth = _props4.canChangeMonth;
var onKeyDown = _props4.onKeyDown;
if (!this.props.canChangeMonth && this.props.onKeyDown) {
this.props.onKeyDown(e);
if (!canChangeMonth && onKeyDown) {
onKeyDown(e);
return;
}
if (this.props.canChangeMonth) {
var callback = this.props.onKeyDown ? function () {
return _this5.props.onKeyDown(e);
} : null;
if (canChangeMonth) {
switch (e.keyCode) {
case keys.LEFT:
this.showPreviousMonth(callback);
this.showPreviousMonth(onKeyDown);
break;
case keys.RIGHT:
this.showNextMonth(callback);
this.showNextMonth(onKeyDown);
break;
default:
if (onKeyDown) {
onKeyDown(e);
}
}

@@ -392,9 +394,9 @@ }

value: function renderMonth(date, i) {
var _this6 = this;
var _this5 = this;
var _props4 = this.props;
var locale = _props4.locale;
var localeUtils = _props4.localeUtils;
var onCaptionClick = _props4.onCaptionClick;
var captionElement = _props4.captionElement;
var _props5 = this.props;
var locale = _props5.locale;
var localeUtils = _props5.localeUtils;
var onCaptionClick = _props5.onCaptionClick;
var captionElement = _props5.captionElement;

@@ -405,3 +407,3 @@

onClick: onCaptionClick ? function (e) {
return _this6.handleCaptionClick(e, date);
return _this5.handleCaptionClick(e, date);
} : null

@@ -435,5 +437,5 @@ });

value: function renderWeekDays() {
var _props5 = this.props;
var locale = _props5.locale;
var localeUtils = _props5.localeUtils;
var _props6 = this.props;
var locale = _props6.locale;
var localeUtils = _props6.localeUtils;

@@ -457,7 +459,7 @@ var days = [];

value: function renderWeeksInMonth(month) {
var _this7 = this;
var _this6 = this;
var _props6 = this.props;
var locale = _props6.locale;
var localeUtils = _props6.localeUtils;
var _props7 = this.props;
var locale = _props7.locale;
var localeUtils = _props7.localeUtils;

@@ -470,3 +472,3 @@ var firstDayOfWeek = localeUtils.getFirstDayOfWeek(locale);

week.map(function (day) {
return _this7.renderDay(month, day);
return _this6.renderDay(month, day);
})

@@ -479,7 +481,7 @@ );

value: function renderDay(month, day) {
var _this8 = this;
var _this7 = this;
var _props7 = this.props;
var enableOutsideDays = _props7.enableOutsideDays;
var modifierFunctions = _props7.modifiers;
var _props8 = this.props;
var enableOutsideDays = _props8.enableOutsideDays;
var modifierFunctions = _props8.modifiers;

@@ -514,7 +516,7 @@

var _props8 = this.props;
var onDayMouseEnter = _props8.onDayMouseEnter;
var onDayMouseLeave = _props8.onDayMouseLeave;
var onDayTouchTap = _props8.onDayTouchTap;
var onDayClick = _props8.onDayClick;
var _props9 = this.props;
var onDayMouseEnter = _props9.onDayMouseEnter;
var onDayMouseLeave = _props9.onDayMouseLeave;
var onDayTouchTap = _props9.onDayTouchTap;
var onDayClick = _props9.onDayClick;

@@ -535,15 +537,15 @@ var tabIndex = null;

onKeyDown: function onKeyDown(e) {
return _this8.handleDayKeyDown(e, day, modifiers);
return _this7.handleDayKeyDown(e, day, modifiers);
},
onMouseEnter: onDayMouseEnter ? function (e) {
return _this8.handleDayMouseEnter(e, day, modifiers);
return _this7.handleDayMouseEnter(e, day, modifiers);
} : null,
onMouseLeave: onDayMouseLeave ? function (e) {
return _this8.handleDayMouseLeave(e, day, modifiers);
return _this7.handleDayMouseLeave(e, day, modifiers);
} : null,
onClick: onDayClick ? function (e) {
return _this8.handleDayClick(e, day, modifiers);
return _this7.handleDayClick(e, day, modifiers);
} : null,
onTouchTap: onDayTouchTap ? function (e) {
return _this8.handleDayTouchTap(e, day, modifiers);
return _this7.handleDayTouchTap(e, day, modifiers);
} : null

@@ -557,10 +559,10 @@ },

value: function render() {
var _this9 = this;
var _this8 = this;
var _props9 = this.props;
var numberOfMonths = _props9.numberOfMonths;
var locale = _props9.locale;
var canChangeMonth = _props9.canChangeMonth;
var _props10 = this.props;
var numberOfMonths = _props10.numberOfMonths;
var locale = _props10.locale;
var canChangeMonth = _props10.canChangeMonth;
var attributes = _objectWithoutProperties(_props9, ["numberOfMonths", "locale", "canChangeMonth"]);
var attributes = _objectWithoutProperties(_props10, ["numberOfMonths", "locale", "canChangeMonth"]);

@@ -587,9 +589,9 @@ var currentMonth = this.state.currentMonth;

"div",
_extends({ className: className,
_extends({}, attributes, {
className: className,
role: "widget",
tabIndex: canChangeMonth && attributes.tabIndex,
onKeyDown: function onKeyDown(e) {
return _this9.handleKeyDown(e);
}
}, attributes),
return _this8.handleKeyDown(e);
} }),
canChangeMonth && this.renderNavBar(),

@@ -596,0 +598,0 @@ months

{
"name": "react-day-picker",
"version": "1.3.0",
"version": "1.3.1",
"description": "Flexible date picker component for React",

@@ -5,0 +5,0 @@ "main": "DayPicker.js",

@@ -18,3 +18,2 @@ <p align="center">

[![build status](https://img.shields.io/travis/gpbl/react-day-picker/master.svg?style=flat-square)](https://travis-ci.org/gpbl/react-day-picker)

@@ -27,3 +26,3 @@ [![coveralls](https://img.shields.io/coveralls/gpbl/react-day-picker.svg?style=flat-square)](https://coveralls.io/r/gpbl/react-day-picker?branch=master)

### Documentation
### How to use

@@ -38,9 +37,11 @@ * [Examples with code](http://gpbl.org/react-day-picker/examples)

* [Utilities](http://www.gpbl.org/react-day-picker/docs/Utilities.html)
* [Changelog](https://github.com/gpbl/react-day-picker/releases)
* [Changelog](CHANGELOG.md)
### Contribute
### Partecipate
* [Github](https://github.com/gpbl/react-day-picker) – pull requests are welcome!
* [Gitter room](https://gitter.im/gpbl/react-day-picker) – ask questions and chat with other developers
* [Issues](https://github.com/gpbl/react-day-picker/issues) – file bugs and suggestions
* [Gitter room](https://gitter.im/gpbl/react-day-picker) – ask questions and chat with other developers
* Check out the source code on [Github](https://github.com/gpbl/react-day-picker)
* Pull requests are welcome! If you are planning a pull request with lot of changes, please add an issue to discuss your idea first
* See how to start the project locally [here](http://www.gpbl.org/react-day-picker/docs/Contributing.html)

@@ -69,2 +70,9 @@ ## Quick start

If you are not using ES2015, until [this is not fixed](https://github.com/gpbl/react-day-picker/issues/136)
you should require the module as:
```js
var DayPicker = require("react-day-picker").default
```
**Install via Bower**

@@ -71,0 +79,0 @@

Sorry, the diff of this file is not supported yet

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