-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'any' of undefined at startDate: PropTypes.any #22
Comments
Hi Sruthi, I have the same problem. It looks like React.PropTypes is deprecated as of React v15.5. I think downgrading to a supported version would fix this but I am going to fork this and change to the prop-types version for later versions of React. |
Update: You can just use the files in the "src" folder as regular react components to get this working. Make sure to install all dependencies. |
Is there any way around this yet? I am facing the same issue and it is stopping me from using the package. @arieu, please what do you mean by "Using the files in src" |
Is there any update on this? |
This is quite an easy fix relating to the later versions of React. PropTypes are no longer included as part of the 'react' component so you need to import them separately. Since the new usage of PropTypes is also different you will need to adjust some a tiny bit of source for this module. There are a couple of ways to do this. Either edit the node src file yourself: \node_modules\react-bootstrap-datetimerangepicker\lib\index.js step 1: ln42 - ln55 remove all instances of _react2['default']. Original: New The second option is basically the same as the above but using the un gulped src file (\node_modules\react-bootstrap-datetimerangepicker\src\index.js) and lifting the component out of the node_models into a component of your own. |
I strongly believe that the correct approach to solve this issue would be bumping a 3.X.X version with the |
Is there any proper solutions for the issue, apart from this the package works nice and well |
Hi I am getting the following error when I used one of your examples in my project
Cannot read property 'any' of undefined
When I followed the error in bundle file, it showed the error at proptype definitions in the DatetimeRangePicker component
at
startDate: PropTypes.any
The text was updated successfully, but these errors were encountered: