CalendarPicker icon indicating copy to clipboard operation
CalendarPicker copied to clipboard

initialDate props not working

Open bhoopendrayash opened this issue 2 years ago • 2 comments

bhoopendrayash avatar Jan 25 '22 14:01 bhoopendrayash

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

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

none of those work.

alwex avatar Apr 16 '22 04:04 alwex

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

alwex avatar Apr 16 '22 04:04 alwex