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

[pickers] Add Month and Year calendar button slots #10874

Closed
LukasTy opened this issue Nov 2, 2023 · 3 comments · Fixed by #13321
Closed

[pickers] Add Month and Year calendar button slots #10874

LukasTy opened this issue Nov 2, 2023 · 3 comments · Fixed by #13321
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature

Comments

@LukasTy
Copy link
Member

LukasTy commented Nov 2, 2023

Created from: #4662 (comment)

We currently do not have any slots targeting MonthCalendar and YearCalendar; thus those components are pretty hard to style/override in a more complex manner.

The idea is to at minimum add yearButton and monthButton slots.

Search keywords:

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature labels Nov 2, 2023
@jansepke
Copy link

jansepke commented May 8, 2024

@LukasTy I would like to help here and was able to add a slot for the yearButton to DateCalender and YearCalender but the PickersYear component is currently not exported. What is required to export a component? I can see at least these todos:

  • export component and types in index.ts
  • add PropTypes
  • add JSDocs to PropTypes and TS Types

@LukasTy
Copy link
Member Author

LukasTy commented May 17, 2024

@jansepke I'm sorry for the late reply.
Could you clarify which component you are trying to turn into a slot?
Is it the PickersYear or PickersYearButton?
IMHO, it would be great to make the PickersYearButton component a slot and then there does not seem to be a need to export it, because the only thing it does is application of a few styles. 🤔
It could be styled via the sx prop or by passing a custom component.
What do you think?

Copy link

⚠️ 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.

@LukasTy: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants