I'm setting up a website using Office Fabric UI but didn't found a way to enable specific days from the DatePicker component (and disable all the others).
My stack consists of Nodejs and React, thus I'm using the office-ui-fabric-react
package. This is what I have:
<DatePicker
isRequired={true}
ariaLabel={"This field is required."}
value={this.state.startDate}
firstDayOfWeek={DayOfWeek.Monday}
onSelectDate={this.handleDateChange}
/>
I think this can be achieve with pickadate.js this way:
picker.set('disable', true); // Disable all
picker.set('enable', enableDates); // Enable some
But I can't really understand how to connect that script with the React component... any ideas? Am I missing something?
Thank you!
P.S.: I know that the Calendar component implements a restrictedDates
attribute to disable an array of dates. But I'm trying to do the opposite (disable everything and enable some) using the DatePicker.