0

i have an array of dates which i store in a state called "row".

enter image description here

i want to disable these days in react-day-picker

<DayPicker
          selectedDays={this.state.selectedDays}
          onDayClick={this.handleDayClick}
          disabledDays={
                        [{
                           before: new Date(),
                            },]
                       }
                    />

how can i disable these dates in daypicker?

Abdur Rehman
  • 65
  • 1
  • 2
  • 8

1 Answers1

1

As per the documentation, for your problem, you just need to pass an array of days object into disabledDays prop.

check it: http://react-day-picker.js.org/api/DayPicker/#disabledDays

To know how to use the object, you can refer this page: http://react-day-picker.js.org/docs/matching-days/

abhishake
  • 763
  • 9
  • 16