You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using <DatePicker ... />, there is the new slotProps. From the docs and digging into the actual files, it looks like an icon should be able to be assigned with a component.
Hello,
have you tried using slots instead? slotProps are for exactly that - passing props to certain slots.
Feel free to check the documentation example with the given slots overridden.
Closing the issue as the solution to the problem seems to be documented. 👍
If you feel that there is some missing information, feel free to reopen the issue. 😉
@LukasTy I did try that too but must have done something incorrectly to begin with, and it looked like slotProps was the appropriate way. Thanks for clarifying. I got it to change now. Appreciate the direction.
Duplicates
Latest version
Steps to reproduce 🕹
When using
<DatePicker ... />
, there is the newslotProps
. From the docs and digging into the actual files, it looks like an icon should be able to be assigned with a component.The screen shot shows that the default
ArrowLeft
andArrowRight
icons. Standard MUI icons have been tried, but not working either.Chevron component below that uses the MUI SvgIcon component
Below is a screen show that shows that the ChevronIcon works
Current behavior 😯
When trying to assign
leftArrowIcon
andrightArrowIcon
, just the defaultArrowLeft
andArrowRight
appear.Expected behavior 🤔
The custom component for
<ChevronIcon />
should be displaying in place ofArrowLeft
andArrowRight
Context 🔦
Trying to customize the DatePicker for company brand style guide.
Your environment 🌎
npx @mui/envinfo
I am using Brave Browser
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: