Material-ui-pickers: Uncaught TypeError: Cannot read property 'date' of undefined BasePicker.js:42

Created on 16 Jul 2018  路  5Comments  路  Source: mui-org/material-ui-pickers

I use DateTimePicker
install material-ui-pickers and moment

Most helpful comment

Have you wrapped the root with MaterialUiPickersProvider?

All 5 comments

Have you wrapped the root with MaterialUiPickersProvider?

I resolved problem.

import { MuiThemeProvider } from '@material-ui/core/styles';
import MomentUtils from 'material-ui-pickers/utils/moment-utils';
import MuiPickersUtilsProvider from 'material-ui-pickers/utils/MuiPickersUtilsProvider';

{routes()}

<MuiPickersUtilsProvider utils={MomentUtils} moment={moment}> {routes()} </MuiPickersUtilsProvider>

You must wrapper all app in MuiPickersUtilsProvider

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aditya81070 picture aditya81070  路  3Comments

filipenevola picture filipenevola  路  4Comments

danmce picture danmce  路  3Comments

basselAhmed picture basselAhmed  路  3Comments

benneq picture benneq  路  3Comments