question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DatePicker - pickerProviderWrapper is overriding the parent Provider

See original GitHub issue

Sorry for posting a bug report for MUI V 5. But the issue can be resolved quite easily.

The pickerProviderWrapper in the DatePicker is overriding any Provider above it and by that, the language always stays en. The only way to change it is to set it for each DatePicker itself. In smaller projects that is not a big deal but in larger ones we need to detect the used language and get the appropriate fns language for it and that for each date field.

I’m not sure why there is pickerProviderWrapper inside of DatePicker. The LocalizationProvider is required by MUI anyway, Is it possible that we just remove that one? If it’s OK I can send a PR for this.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lookfirstcommented, Mar 26, 2022

Turns out it was pretty easy to fix this. Released as 5.2.0. Enjoy.

0reactions
TarikHubercommented, Mar 27, 2022

Thx @lookfirst. Sorry I did not send a PR. Quite occupied with other stuff.

Read more comments on GitHub >

github_iconTop Results From Across the Web

prevent DateTimePicker's CSS overriding - Stack Overflow
I am trying to use http://tarruda.github.io/bootstrap-datetimepicker/ in my webpage, but it overrides my css and I failed while trying to ...
Read more >
How to customize react-datepicker-wrapper class · Issue #2099
Overriding styles with CSS would not be ideal because my changes would impact every instance of the datepicker in my application.
Read more >
DatePicker (JavaFX 8) - Oracle Help Center
The DatePicker control allows the user to enter a date as text or to select a date from a calendar ... Properties inherited...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found