[BUG] `initialVisibleMonth` props on `DateRangePicker` isn't works correctly when specify None
Environment
dash 1.12.0
dash-core-components 1.10.0
dash-html-components 1.0.3
dash-renderer 1.4.1
dash-table 4.7.0
- OS: Windows 10
- Browser Chrome
- Version 83.0.4103.97
Description
I use dcc.DatePickerRange without initial_visible_month to use current start/end date for initial month in selector.
But, that feature by following code is not works correctly.
https://github.com/plotly/dash-core-components/blob/7dbf19a/src/fragments/DatePickerRange.react.js#L160-L169
initial_visible_month is already converted by convertToMoment.
convertToMoment handle falsy values like null, and convert to not null value after commit cc3ac2e7 and continue current code.
Therefore, that function for initialVisibleMonth will receive non-null value even if specify None to initial_visible_month.
Expected behavior
When click start date, open selector with month of start date. (OK) When click end date, open selector with month of end date. (NG)
Related issue
- #677
This fix would be really appreciated, as it isn't user friendly to have to click through years worth of months when changing the end date.