react-day-picker
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"name": "react-day-picker", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Customizable date picker and calendar component for React.js", | ||
@@ -36,3 +36,3 @@ "main": "./lib/DayPicker.js", | ||
"peerDependencies": { | ||
"react": "~0.13.x" | ||
"react": "~0.13.x || ~0.14.x" | ||
}, | ||
@@ -47,9 +47,11 @@ "devDependencies": { | ||
"eslint-plugin-react": "^3.2.3", | ||
"exenv": "^1.2.0", | ||
"fbjs": "^0.2.1", | ||
"istanbul": "^0.3.15", | ||
"jsdom": "^6.5.1", | ||
"mocha": "^2.2.5", | ||
"mocha-jsdom": "^1.0.0", | ||
"moment": "^2.10.3", | ||
"react": "^0.13.3", | ||
"react-tap-event-plugin": "0.1.7", | ||
"react": "^0.14.0", | ||
"react-dom": "^0.14.0", | ||
"react-tap-event-plugin": "^0.2.0", | ||
"sinon": "^1.15.3", | ||
@@ -56,0 +58,0 @@ "sinon-chai": "^2.8.0", |
@@ -13,3 +13,3 @@ # react-day-picker | ||
* ready for i18n, with [moment.js](http://momentjs.com) or any other library | ||
* navigable via keyboard and | ||
* navigable via keyboard, ARIA support is [getting better](https://github.com/gpbl/react-day-picker/issues?q=is%3Aopen+is%3Aissue+label%3Aaria) | ||
@@ -22,4 +22,6 @@ [![Build Status](https://travis-ci.org/gpbl/react-day-picker.svg)](https://travis-ci.org/gpbl/react-day-picker) | ||
[See the website](http://www.gpbl.org/react-day-picker/) for examples with code, API and tips. Release notes are [here](https://github.com/gpbl/react-day-picker/releases). | ||
📖 [Go to the website for examples with code, API and tips](http://www.gpbl.org/react-day-picker/) | ||
If you need support, drop a line in the [gitter room](https://gitter.im/gpbl/react-day-picker) or check the [issues](https://github.com/gpbl/react-day-picker/issues). Release notes are [here](https://github.com/gpbl/react-day-picker/releases). | ||
### Usage | ||
@@ -26,0 +28,0 @@ |
@@ -11,6 +11,8 @@ | ||
const React = require("react/addons"); | ||
const DayPicker = require("../src/DayPicker"); | ||
const ExecutionEnvironment = require("react/lib/ExecutionEnvironment"); | ||
const ReactDOM = require("react-dom"); | ||
const ExecutionEnvironment = require("exenv"); | ||
ExecutionEnvironment.canUseDOM = true; | ||
const DayPicker = require("../src/DayPicker"); | ||
const TestUtils = React.addons.TestUtils; | ||
@@ -110,4 +112,4 @@ | ||
expect(captionEl).to.have.length(4); | ||
expect(React.findDOMNode(captionEl[0]).innerHTML).to.equal("December 2015"); | ||
expect(React.findDOMNode(captionEl[1]).innerHTML).to.equal("January 2016"); | ||
expect(ReactDOM.findDOMNode(captionEl[0]).innerHTML).to.equal("December 2015"); | ||
expect(ReactDOM.findDOMNode(captionEl[1]).innerHTML).to.equal("January 2016"); | ||
}); | ||
@@ -191,5 +193,5 @@ | ||
"DayPicker-Day"); | ||
expect(React.findDOMNode(days[0]).innerHTML).to.equal(""); | ||
expect(React.findDOMNode(days[1]).innerHTML).to.equal(""); | ||
expect(React.findDOMNode(days[2]).innerHTML).to.equal(""); | ||
expect(ReactDOM.findDOMNode(days[0]).innerHTML).to.equal(""); | ||
expect(ReactDOM.findDOMNode(days[1]).innerHTML).to.equal(""); | ||
expect(ReactDOM.findDOMNode(days[2]).innerHTML).to.equal(""); | ||
}); | ||
@@ -204,5 +206,5 @@ | ||
"DayPicker-Day"); | ||
expect(React.findDOMNode(days[0]).innerHTML).to.equal("28"); | ||
expect(React.findDOMNode(days[1]).innerHTML).to.equal("29"); | ||
expect(React.findDOMNode(days[2]).innerHTML).to.equal("30"); | ||
expect(ReactDOM.findDOMNode(days[0]).innerHTML).to.equal("28"); | ||
expect(ReactDOM.findDOMNode(days[1]).innerHTML).to.equal("29"); | ||
expect(ReactDOM.findDOMNode(days[2]).innerHTML).to.equal("30"); | ||
}); | ||
@@ -217,3 +219,3 @@ | ||
"DayPicker-Day"); | ||
expect(React.findDOMNode(days[0]).innerHTML).to.equal("28"); | ||
expect(ReactDOM.findDOMNode(days[0]).innerHTML).to.equal("28"); | ||
}); | ||
@@ -228,3 +230,3 @@ | ||
"DayPicker-Day--today"); | ||
expect(React.findDOMNode(todayEl).innerHTML).to.equal(`${today.getDate()}`); | ||
expect(ReactDOM.findDOMNode(todayEl).innerHTML).to.equal(`${today.getDate()}`); | ||
}); | ||
@@ -251,4 +253,4 @@ | ||
"DayPicker-Day--firstDayOfMonth"); | ||
expect(React.findDOMNode(firstDaysEl[0]).innerHTML).to.equal("1"); | ||
expect(React.findDOMNode(firstDaysEl[1]).innerHTML).to.equal("1"); | ||
expect(ReactDOM.findDOMNode(firstDaysEl[0]).innerHTML).to.equal("1"); | ||
expect(ReactDOM.findDOMNode(firstDaysEl[1]).innerHTML).to.equal("1"); | ||
@@ -455,3 +457,2 @@ const allEl = TestUtils.scryRenderedDOMComponentsWithClass(dayPickerEl, | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -516,3 +517,2 @@ | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -555,3 +555,2 @@ | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -593,3 +592,2 @@ | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -617,3 +615,2 @@ | ||
it("shows the previous month when clicking on (enabled) outside days", () => { | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -639,3 +636,2 @@ const dayPickerEl = TestUtils.renderIntoDocument( | ||
it("shows the previous month (of 2 months) when clicking on (enabled) outside days", () => { | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -663,3 +659,2 @@ const dayPickerEl = TestUtils.renderIntoDocument( | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -687,3 +682,2 @@ | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -713,3 +707,2 @@ | ||
React.initializeTouchEvents(true); | ||
require("react-tap-event-plugin")(); | ||
@@ -741,3 +734,3 @@ | ||
); | ||
const node = React.findDOMNode(dayPickerEl); | ||
const node = ReactDOM.findDOMNode(dayPickerEl); | ||
const dayNode = node.querySelector(".DayPicker-Day:not(.DayPicker-Day--outside)"); | ||
@@ -755,3 +748,3 @@ TestUtils.Simulate.keyDown(dayNode, { | ||
); | ||
const node = React.findDOMNode(dayPickerEl); | ||
const node = ReactDOM.findDOMNode(dayPickerEl); | ||
const dayNode = node.querySelector(".DayPicker-Day:not(.DayPicker-Day--outside)"); | ||
@@ -769,3 +762,3 @@ TestUtils.Simulate.keyDown(dayNode, { | ||
); | ||
const node = React.findDOMNode(dayPickerEl); | ||
const node = ReactDOM.findDOMNode(dayPickerEl); | ||
const dayNode = node.querySelector(".DayPicker-Day:not(.DayPicker-Day--outside)"); | ||
@@ -783,3 +776,3 @@ TestUtils.Simulate.keyDown(dayNode, { | ||
const showPreviousMonth = sinon.spy(dayPickerEl, "showPreviousMonth"); | ||
TestUtils.Simulate.keyDown(React.findDOMNode(dayPickerEl), { | ||
TestUtils.Simulate.keyDown(ReactDOM.findDOMNode(dayPickerEl), { | ||
keyCode: keys.LEFT | ||
@@ -795,3 +788,3 @@ }); | ||
const showPreviousMonth = sinon.spy(dayPickerEl, "showPreviousMonth"); | ||
TestUtils.Simulate.keyDown(React.findDOMNode(dayPickerEl), { | ||
TestUtils.Simulate.keyDown(ReactDOM.findDOMNode(dayPickerEl), { | ||
keyCode: keys.ENTER | ||
@@ -807,3 +800,3 @@ }); | ||
const showNextMonth = sinon.spy(dayPickerEl, "showNextMonth"); | ||
TestUtils.Simulate.keyDown(React.findDOMNode(dayPickerEl), { | ||
TestUtils.Simulate.keyDown(ReactDOM.findDOMNode(dayPickerEl), { | ||
keyCode: keys.RIGHT | ||
@@ -819,3 +812,3 @@ }); | ||
const showNextMonth = sinon.spy(dayPickerEl, "showNextMonth"); | ||
TestUtils.Simulate.keyDown(React.findDOMNode(dayPickerEl), { | ||
TestUtils.Simulate.keyDown(ReactDOM.findDOMNode(dayPickerEl), { | ||
keyCode: keys.ENTER | ||
@@ -830,3 +823,3 @@ }); | ||
); | ||
const node = React.findDOMNode(dayPickerEl); | ||
const node = ReactDOM.findDOMNode(dayPickerEl); | ||
const dayNode = node.querySelectorAll(".DayPicker-Day:not(.DayPicker-Day--outside)")[0]; | ||
@@ -844,3 +837,3 @@ const focusPreviousDay = sinon.spy(dayPickerEl, "focusPreviousDay"); | ||
); | ||
const node = React.findDOMNode(dayPickerEl); | ||
const node = ReactDOM.findDOMNode(dayPickerEl); | ||
const dayNode = node.querySelector(".DayPicker-Day:not(.DayPicker-Day--outside)"); | ||
@@ -866,3 +859,3 @@ const focusNextDay = sinon.spy(dayPickerEl, "focusNextDay"); | ||
); | ||
body = React.findDOMNode(TestUtils.findRenderedDOMComponentWithClass(dayPickerEl, "DayPicker-Body")); | ||
body = ReactDOM.findDOMNode(TestUtils.findRenderedDOMComponentWithClass(dayPickerEl, "DayPicker-Body")); | ||
}); | ||
@@ -869,0 +862,0 @@ |
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
191727
53
19
1973