Skip to content

Conversation

@MehdiAlipooor
Copy link
Contributor

What this PR does

This PR fixes an issue where getMonthControlProps and getYearControlProps did not properly
override the default control children in date picker components.

Fixes:

  • children returned from getMonthControlProps in <MonthsList /> are now rendered correctly instead of the default formatted month label.
  • children returned from getYearControlProps in <YearsList /> are now rendered correctly instead of the default formatted year label.

Additional changes:

  • Added to storybook to ensure custom children override behavior for month controls.
  • Ensured consistency between month and year control props behavior.

Why

Consumers expect these props to fully override the rendered content of month/year picker controls.
Previously, the default label still rendered, making customization impossible.

Breaking changes

None.

Checklist

  • Fix children override behavior in MonthsList and YearsList component
  • Add storybook for custom month control children in MonthsList and YearsList
  • Ensure year control props behave consistently
  • All existing tests pass

@rtivital rtivital merged commit d26f9e6 into mantinedev:master Dec 5, 2025
1 check passed
@rtivital
Copy link
Member

rtivital commented Dec 5, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants