Open oskarleonard opened 5 years ago
@oskarleonard I don't know why you are getting that error without seeing more of your code, but to get the range selected, have you tried something like this?
const selectedStartDate = moment("2019-02-16")
...
selectedValue={[selectedStartDate, selectedStartDate.clone().add(7, 'days')]}
...
I want to select multiple dates programmatically since i have a "filter" for week view and day view. So when in week view i would like to select that whole week.
I tried to pass in an array of dates to selectedValue (as one can do for ´RangeCalendar
) to
Calendarand got an undocumented behavior. It seemed to select the dates in the arrat (not acting like a range), so if i passed in
selectedValue={[moment("2019-02-16"), moment("2019-02-20")]}`, the dates 2019-02-16 and 2019-02-20 was selected (not the dates in between). This is all good and i can modify it to my needs using this prop, hover im gettingWhich makes me think either this is not really supported and will lead to bugs