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

comron picture comron  路  22Comments

nkint picture nkint  路  21Comments

aaronjensen picture aaronjensen  路  52Comments

asulaiman picture asulaiman  路  28Comments

Jucesr picture Jucesr  路  19Comments