react-bootstrap-datetimerangepicker
react-bootstrap-datetimerangepicker copied to clipboard
Does not work in react 16
TypeError: _react2.default.PropTypes is undefined when trying to use this component.
I just noticed that the Github source has been migrated to PropTypes. It's just the npm package that is outdated. Please publish the current version to npm.
I've submitted a PR that will fix the build. Just waiting for it to be merged and pushed to npm. In the meantime you can mitigate the issue with PropTypes using dependency injection by doing something like this:
var React = require('react'),
$ = require('jquery'),
DatetimeRangePicker;
React.PropTypes = require('prop-types');
DatetimeRangePicker = $.extend(require('react-bootstrap-datetimerangepicker'), { _react: React });
Any chance on moving it up? Component is unusable for now
Unfortunately the project owner doesn't seem active anymore so the pull requests aren't getting looked at. You could try this component instead which is more or less an up to date clone https://github.com/skratchdot/react-bootstrap-daterangepicker
I hope this gets fixed soon since it is entirely broken at this point while using the latest React version.
You can just use the files in the "src" folder as regular react components to get this working. Make sure to install all dependencies. That's what I did and it works fine. Let me know if this works for you guys.
This didn't work for me.. I used the source but I still get the same problems. Anyone able to get this fixed?
Uncaught TypeError: Cannot read property 'any' of undefined at index.js:42 at Object../node_modules/react-bootstrap-datetimerangepicker/lib/index.js (index.js:195)
You can also do this in package.json to install from GitHub:
"dependencies": { "react-bootstrap-datetimerangepicker": "luqin/react-bootstrap-datetimerangepicker#master", },