React-dates: My Calendar doesn't show up, why?

Created on 12 Dec 2018  路  1Comment  路  Source: airbnb/react-dates

Hi,

I'm just trying to use react-dates and it seems the calendar doesn't show up whereas the console.log is displayed.

When I click on StartDate, I only have a console.log, not the calendar. I cannot choose a date.

Someone knows why?

Thanks

capture d ecran 2018-12-12 a 14 47 45

capture d ecran 2018-12-12 a 14 47 12

capture d ecran 2018-12-12 a 14 48 32

question

Most helpful comment

Hi @Steffi3rd, calendar visibility is controlled by the focusedInput prop. When it is null, the calendar is always hidden, as it is in your case. This is why we recommend using a state variable to control the focusedInput value and then updating that state variable with the onFocusChange prop. You can see an example of a functional wrapper around the DateRangePicker in https://github.com/airbnb/react-dates/blob/master/examples/DateRangePickerWrapper.jsx.

>All comments

Hi @Steffi3rd, calendar visibility is controlled by the focusedInput prop. When it is null, the calendar is always hidden, as it is in your case. This is why we recommend using a state variable to control the focusedInput value and then updating that state variable with the onFocusChange prop. You can see an example of a functional wrapper around the DateRangePicker in https://github.com/airbnb/react-dates/blob/master/examples/DateRangePickerWrapper.jsx.

Was this page helpful?
0 / 5 - 0 ratings