-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pickers] Not possible to provide custom styling to the DesktopDatePicker component #5112
Comments
its happening for all other components also. Native styling is getting priority over sx styling. so can not override it. |
Thank you @sumitnitsurat for the feedback. |
It doesn't look like this bug report has enough info for one of us to reproduce it. Please provide a CodeSandbox (https://material-ui.com/r/issue-template-latest). |
Here is a sample sandbox with what have right now: https://codesandbox.io/s/crazy-frost-130vs Unfortunately we are not allowed to post the InputField implementation, but it should give you an idea of our current state. Keep in mind that this is using the default styling for:
As mentioned in the first message we tried to override the default styling using the aforementioned 5 methods. |
I am facing a similar issue and here is my observation so far. The latest version |
Having the same issue here. Tried |
Think I have solved the problem. The way that I did is to use PaperProps. Before, I used Whereas in the Hope this helps! Edit: |
Duplicates #6218, we are discussing this problem there 👍 |
I have updated to the latest @mui/material v5.0.1, used the DesktopDatePicker component and tried to provide custom styling to it (different background-color, font color, date-selection color and a different input field style).
Using the renderInput to render our custom InputField component was successfull, however I was not able to style the elements from the Modals that show up (a.k.a MuiCalendarPicker).
Current Behavior 😯
I have used the following methods which were unsuccessful:
sx={{'& .MuiCalendarPicker-root':{backgroundColor: 'purple'}}}
'& .MuiCalendarPicker-root'
or'& .MuiCalendarPicker'
to style.Expected Behavior 🤔
The styling of the MuiCalendarPicker or the styling of the Modal contents in general should change
Your Environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: