stephy / CalendarPicker

CalendarPicker Component for React Native
787 stars 369 forks source link

initialDate props not working #309

Open bhoopendrayash opened 2 years ago

alwex commented 2 years ago

I confirm, initialDate props does not seems to have any effect.

<CalendarPicker initialDate={moment()} />
<CalendarPicker initialDate={new Date()} />

none of those work.

alwex commented 2 years ago

I finally found the solution, the props names are quite confusing, here is how to set the initial date

<CalendarPicker selectedStartDate={selectedDate.toDate()} />

explained here https://github.com/stephy/CalendarPicker/issues/268