Skip to content
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

[DatePicker] Allow customizing icons #23673

Closed
1 task done
jahglow opened this issue Aug 4, 2020 · 9 comments · Fixed by #24017
Closed
1 task done

[DatePicker] Allow customizing icons #23673

jahglow opened this issue Aug 4, 2020 · 9 comments · Fixed by #24017
Labels
component: date picker This is the name of the generic UI component, not the React module! new feature New feature or request ready to take Help wanted. Guidance available. There is a high chance the change will be accepted

Comments

@jahglow
Copy link

jahglow commented Aug 4, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

Month picker dropdown should have icon customization (like those for month pagination leftArrowIcon etc)

Examples 🌈

expected:

current:

Motivation 🔦

@oliviertassinari
Copy link
Member

@jahglow Which API would you envision? What do you think of #21453?

@jahglow
Copy link
Author

jahglow commented Aug 14, 2020

@oliviertassinari I'm for consistency. So choose whatever pattern you've chosen for the rest of the props and we'll follow along. Since both packages relate to the same set of MUI, then a single way of doing things is preferred. I like the components approach, it's more flexible for you to pass down any necessary props and for me to adjust the render if necessary.

@oliviertassinari oliviertassinari changed the title Month selection dropdown icon not exposed for customization in v4.00-alpha.11 Allow to customize month selection icon Aug 14, 2020
@oliviertassinari oliviertassinari changed the title Allow to customize month selection icon [DatePicker] Allow to customize month selection icon Nov 22, 2020
@oliviertassinari oliviertassinari changed the title [DatePicker] Allow to customize month selection icon [DatePicker] Allow customizing icons Nov 22, 2020
@oliviertassinari oliviertassinari transferred this issue from mui/material-ui-pickers Nov 22, 2020
@oliviertassinari oliviertassinari added component: date picker This is the name of the generic UI component, not the React module! new feature New feature or request labels Nov 22, 2020
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 22, 2020

Considering the number of components that can be customized in the date picker, e.g. mui/mui-x#6488, and that we are going in the same direction fo the data grid, I think that we should remove leftArrowIcon, rightArrowIcon, rightArrowButtonProps, leftArrowButtonProps props, and replace them with the components={{ MonthNextIconButton, MonthPreviewIconButton }} API. Simpler, and allows us to build custom design systems.

@jahglow For the icon you are interested in, maybe DayDropdownIconButton?

@jahglow
Copy link
Author

jahglow commented Nov 23, 2020 via email

@oliviertassinari oliviertassinari added the ready to take Help wanted. Guidance available. There is a high chance the change will be accepted label Nov 23, 2020
@angadp
Copy link

angadp commented Dec 2, 2020

Can I take this one? I have gone through the documentation and the issue. Would love for this to be my first PR.

@angadp
Copy link

angadp commented Dec 2, 2020

From what I understand I need to expose a prop which will take an icon and that icon should appear on the datepicker.

@oliviertassinari
Copy link
Member

oliviertassinari commented Dec 2, 2020

@angadp Feel free to work on it :). We need to introduce a components prop to handed the override of nested elements #21453.

@angadp
Copy link

angadp commented Dec 3, 2020

Thanks will go through the threads

atoulmet added a commit to atoulmet/material-ui that referenced this issue Dec 9, 2020
@jackcwu
Copy link
Contributor

jackcwu commented Dec 12, 2020

@tcho0501 and I will take a try at it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date picker This is the name of the generic UI component, not the React module! new feature New feature or request ready to take Help wanted. Guidance available. There is a high chance the change will be accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants