Closed amitconnectwise closed 2 weeks ago
Hey @amitconnectwise ... The Button inside the actionbar are using the material-ui Buttton component, so they will be impacted by the global theming. The text is readable just fine on the default themes, so if you provide a custom theme for your application you need to adjust the colors of that by yourself.
You can also override the styling with the sx
prop on the actionBar using the slotProps
on the DateTimePicker component:
<DateTimePicker
label="Date time picker"
slotProps={{
actionBar: {
sx: (theme) => ({
'& .MuiButton-root': {
color: theme.palette.secondary.main,
},
}),
},
}}
/>
Does that solve your problem?
Yes, this solves the issue. Thank you for your advice.
Great ... glad we could help you! 🎉
:warning: This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.
@amitconnectwise: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.
Steps to reproduce
Link to live example: (required)
Steps: 1. 2. 3.
Current behavior
No response
Expected behavior
No response
Context
datepicker ok button text color is not visible for dark theme
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo
Search keywords: datepicker ok button