react-modern-calendar-datepicker
react-modern-calendar-datepicker copied to clipboard
Default month selected when minimumDate after this month
Describe the bug example Today is 2020-08-07 minimumDate : 2020-09-07
Default showing month 8 instead 9
Hi I would like to contribute to his library. Is this really a bug? Or should we add a feature like this:
A boolean prop called something like "setDefaultMonthInRange". If true, when a minimum date after today and/or a maximum date before today is set, then when opened, the Calendar will by default display the month of the minimum date. If false the calendar will display the current month by default no matter the minimum/maximum date.
A feature definitely. Should be a prop.
Spotted a workaround (not a solution):
Set return-value of getToday
in locale
to Day-object, you want to show up initially.
Hope to hear the update on this feature.
My temporary solution is to set the initial value to minimumDate
that will show the selected month.