I just followed the steps to install react-dates to my project. I'm using their wrapper as a 'hello world' example but can't get it to run.
https://github.com/airbnb/react-dates/blob/master/examples/DateRangePickerWrapper.jsx
but on line 141 I'm getting the runtime error:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check your code at DateRangePickerWrapper.jsx:141.
in DateRangePickerWrapper (at GroupForm.js:253)
in div (at GroupForm.js:204)
in div (at GroupForm.js:201)
in div (at FuseScrollbars.js:155)
in FuseScrollbars (created by Connect(FuseScrollbars))
in Connect(FuseScrollbars) (created by Route)
in Route (created by withRouter(Connect(FuseScrollbars)))
in withRouter(Connect(FuseScrollbars)) (created by
I've tried not using the wrapper and simply importing and using DateRangePicker directly, Setting the parameters of the dates from strings to moment() to PropTypes null.
in my index.js I have import 'react-dates/initialize'; import 'react-dates/lib/css/_datepicker.css';
but I feel like I'm not getting it initialized correctly. Maybe my initialize import isn't being run and therefor it can't find the component name?
This is a project created with 'create-react-app'