Datepicker is not working with React 16.0.0 Beta 1. I was getting errors on PropTypes in the react-datepicker.min.js file.
Can you be more specific and post the errors here?
Figure out it was a webpack include issue with an older version.
We must update proptypes package:
import React from 'react'
import PropTypes from 'prop-types'
I think this is going to be trickier than just updating the proptypes package. React is declared as a peer dependency supporting two different major versions (0.x and 15.x). Ideally, the package versions of react and prop-types should match. I'm not exactly sure if there's some dependency combination that ensures that. I'm reopening this issue so that we can figure out a solution.
FWIW, We're currently on React 15.1.0, which doesn't use the prop-types package. The only harm in using components that use the prop-types package seems to be that we get deprecation warnings about how calling prop types directly is not supported. (They're somewhat misleading in that they blame the render method of a component rather than blaming React itself for the deprecated invocation.)
I do not know how it interacts with 0.14.
Do we actually support 0.14? The README would appear to indicate 15.5 is required for newer versions of react-datepicker, though package.json still says ^0.14.0 || ^15.0.0.
for notoriety of the impact of this issue: +1 (emoticon) if this is preventing you from using React 16 (now that it's released)
Any workaround to make it work with react 16? This is the only incompatible library that I have in my dependencies
There is an open PR to add compatibility with react v16 here: https://github.com/Hacker0x01/react-datepicker/pull/1047 @martijnrusschen @rafeememon would you have some time to take a look?
I'm also having issues with React 16:

Looks like https://github.com/souporserious/react-popper/pull/59 is merged, so updating to the latest version will resolve the issue.
toms-Macbook:~ tom$ cd fireworks/
toms-Macbook:fireworks tom$ clear
toms-Macbook:fireworks tom$ mkdir myproject
toms-Macbook:fireworks tom$ cd myproject/
toms-Macbook:myproject tom$ npm init -y
toms-Macbook:myproject tom$ npm install react react-dom react-datepicker --save
[email protected] /Users/tom/fireworks/myproject
โโโฌ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโฌ [email protected]
โ โ โ โ โโโฌ [email protected]
โ โ โ โ โ โโโ [email protected]
โ โ โ โ โโโ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโฌ [email protected]
โ โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โ โโโ [email protected]
โ โโโฌ [email protected]
โ โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โโโฌ [email protected]
โ โโโ [email protected]
โ โโโ [email protected]
โ โโโ *UNMET PEER DEPENDENCY react@^15.5.x
โ โโโ UNMET PEER DEPENDENCY react-dom@^15.5.x
โ โโโ [email protected]
โ โโโฌ [email protected]
โ โโโ [email protected]
โโโ [email protected]
npm WARN [email protected] requires a peer of react@^15.5.x but none was installed.
npm WARN [email protected] requires a peer of react-dom@^15.5.x but none was installed.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
@martijnrusschen Can we get a release for this published out to npm?
Done.
Most helpful comment
for notoriety of the impact of this issue: +1 (emoticon) if this is preventing you from using React 16 (now that it's released)