React-dates: Uncaught TypeError: Cannot read property 'theme' of undefined

Created on 25 Oct 2017  路  1Comment  路  Source: airbnb/react-dates

ThemedStyleSheet.js?17e6:33 Uncaught TypeError: Cannot read property 'theme' of undefined
at Object.create (ThemedStyleSheet.js?17e6:33)
at withStyles (withStyles.js?55c9:78)
at Object.65 (DateInput.js?edf4:462)
at __webpack_require__ (DateInput.js?edf4:21)
at eval (DateInput.js?edf4:67)
at eval (DateInput.js?edf4:70)
at Object. (bundle.js:2838)
at __webpack_require__ (bundle.js:20)
at Object.34 (DateRangePickerInput.js?2b8e:333)
at __webpack_require__ (DateRangePickerInput.js?2b8e:21)

JUST ON IMPORT
import React from "react";
import moment from 'moment';

import { SingleDatePicker } from 'react-dates';
import 'react-dates/lib/css/_datepicker.css';

NOT SURE WHAT I'M DOING WRONG HERE... IT'S A FIRST USE.

needs react-dateinitialize

Most helpful comment

Hi @axe-z, if you look at the readme, as of v13, there is one additional step to get things working. Specifically, you need to import 'react-dates/initialize'; before you use any of the components.

See https://github.com/airbnb/react-dates#initialize for more info!

>All comments

Hi @axe-z, if you look at the readme, as of v13, there is one additional step to get things working. Specifically, you need to import 'react-dates/initialize'; before you use any of the components.

See https://github.com/airbnb/react-dates#initialize for more info!

Was this page helpful?
0 / 5 - 0 ratings