React-dates: DayPickerSingleDateController: initialVisibleMonth prop doesn't do anything

Created on 22 May 2020  路  1Comment  路  Source: airbnb/react-dates

react-dates version
[email protected]

Describe the bug
Defining initialVisibleMonth prop for DayPickerSingleDateController doesn't do anything.

Source code (including props configuration)

<DayPickerSingleDateController
    initialVisibleMonth={() => moment().add(10, "months")}
/>

Is the issue reproducible in Storybook?
https://codesandbox.io/s/romantic-vaughan-yh5ux?file=/src/App.js:267-365

Additional context
I found this issue when tried to block some days on the calendar while using the prop. It caused unexpected behavior with blocking days.

Most helpful comment

@meness just noticed that it doesn't work without focused prop:

<DayPickerSingleDateController focused initialVisibleMonth={() => moment().add(10, "months")} />

>All comments

@meness just noticed that it doesn't work without focused prop:

<DayPickerSingleDateController focused initialVisibleMonth={() => moment().add(10, "months")} />
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sag1v picture sag1v  路  3Comments

Jesus-Gonzalez picture Jesus-Gonzalez  路  3Comments

augnustin picture augnustin  路  3Comments

yokomizor picture yokomizor  路  3Comments

maciej-w picture maciej-w  路  3Comments