VM84:36 Warning: Failed context type: The context `muiTheme` is marked as required in `DatePicker`, but its value is `undefined`.
See original GitHub issueFirst I got this warning -
Warning: Failed context type: The context muiTheme
is marked as required in DatePicker
, but its value is undefined
.
Then - When clicked on ‘DatePicker’ component nothing happens. DatePicker popup does not open up.
Steps to reproduce
- Require the DatePicker import React from ‘react’; import DatePicker from ‘material-ui/DatePicker’;
- Use it in your component.
Versions
- Material-UI:
“material-ui”: “^0.19.1”,
- React: “react”: “^0.14.3”, “react-dom”: “^0.14.3”,
- Browser: Chrome, Mozilla Note: I am not using any react-tap-event plugin. Previously I used “react-tap-event-plugin”: “^0.2.2”, but issue was still there so I removed it.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
The context `muiTheme` is marked as required in `DatePicker ...
First I got this warning - Warning: Failed context type: The context muiTheme is marked as required in DatePicker, but its value is...
Read more >reactjs - I cannot use material-ui components after update to ...
I got this message in my console: Failed Context Types: Required context muiTheme was not specified ...
Read more >Migration from @material-ui/pickers - MUI
We introduced a new required renderInput prop. This simplifies using non-MUI text field input components. <DatePicker renderInput= ...
Read more >Material-UI Addon | Storybook: Frontend workshop for UI ...
This is addon for React Storybook which wraps your components into MuiThemeProvider. This accelerates and simplifies the development process for Material-UI ...
Read more >Top React date pickers for 2021 - LogRocket Blog
There are a lot of date picker libraries you can choose from, learn about some of the date picker libraries that I found...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am using DateTimePicker as below:
It is throwing below error: warning.js:36 Warning: Failed context type: The context
muiTheme
is marked as required inTextField
, but its value isundefined
.And
Cannot read property ‘prepareStyles’ of undefined
Thanks @oliviertassinari. BTW I fixed it via wrapping inside MuiThemeProvider.