How can I disable click on dates in "Selecting multiple dates".
Inside my render,
<DayPicker selectedDays={this.state.selectedDays} onDayClick={this.handleMultiDayClick} disabledDays={{ before: this.state.currentDay }} />
I am able to disable days but if I click on disabled dates then they are also added in the state.
I would appreciate the help.
Can you not simply check for disabled dates in your onclick handler and exclude the disabled dates from your selectedDays state object?
handleMultiDayClick(e) {
// check here for disabled dates
if(!disabledDate) {
this.setState({selectedDays: this.state.selectedDays.push(newDate).slice(0)})
}
}