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
Datepicker component exposes a month property to enable controlled mode for the month display. But the onMonthChange prop counterpart is not available. In addition the value given to month is ignored.
Comparing with the Calendar component, everything work as expected the month and onMonthChange can be used and the month display is controlled.
I've linked to a codesandbox which reproduce the issue for Datepicker and showing how Calendar is currently working.
What version of @mantine/hooks page do you have in package.json?
5.5.4
If possible, please include a link to a codesandbox with the reproduced problem
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
When month and onMonthChange are provided, Datepicker should enable controlled mode for month display. i.e. month value should be forwarded to the inner Calendar and onMonthChange should be called directly from the inner Calendar as well as from various handlers where setCalendarMonth is called.
The text was updated successfully, but these errors were encountered:
What package has an issue
@mantine/dates
Describe the bug
Datepicker component exposes a
month
property to enable controlled mode for the month display. But theonMonthChange
prop counterpart is not available. In addition the value given tomonth
is ignored.Comparing with the
Calendar
component, everything work as expected themonth
andonMonthChange
can be used and the month display is controlled.I've linked to a codesandbox which reproduce the issue for
Datepicker
and showing howCalendar
is currently working.What version of @mantine/hooks page do you have in package.json?
5.5.4
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/s/repro-datepicker-month-prop-ksfldr?file=/src/App.tsx
Do you know how to fix the issue
No response
Are you willing to participate in fixing this issue and create a pull request with the fix
No response
Possible fix
When
month
andonMonthChange
are provided,Datepicker
should enable controlled mode for month display. i.e.month
value should be forwarded to the innerCalendar
andonMonthChange
should be called directly from the innerCalendar
as well as from various handlers wheresetCalendarMonth
is called.The text was updated successfully, but these errors were encountered: