Open Kurt2189 opened 2 months ago
Hello @Kurt2189.
Have you tried using monthButton
or yearButton
slot to achieve what you are asking? 🤔
I tried, but unfortunately I haven’t achieved any results yet. I would like to pass an array of certain years and in the calendar, if the year matches the value of my array, then somehow indicate it with a checkmark. Sorry if my question seemed stupid.
@Kurt2189 Do you mean something like this? 🤔
Applying conditional slotProps
looks easy, but if you want to create a custom component, I think that we should expose the YearCalendarButton
component we use to make it easier because otherwise, everything needs to be replicated... 🤷
"Sometimes it may be necessary to display additional info right in the calendar. The following demo shows how to add a badge on some day based on server-side data" but how i can this for month or year picker. I want add badge on month or year.
@Kurt2189 To enable the exact same behavior, we would need to publicly expose the mentioned component and a similar component on the MonthCalendar
.
I'm adding this issue to the grooming board to check with the team if we agree with such a solution. 😉
Related page
https://mui.com/x/react-date-pickers/date-calendar/
Kind of issue
Missing information
Issue description
I would like to know if it is possible to mark not only days, but also months and years on a calendar
Context
Dynamic year or month
Search keywords: Dynamic year or month