How to disable the date before that day when setting the date by DatePicker

disabledStartDate = (current) = > {

const endValue = this.state.endValue;
// if (!startValue || !endValue) {
//   return false;
// }
// return  startValue.valueOf() > endValue.valueOf();
return current < moment();

}
disabledDate= {this.disabledStartDate}

set a date that is not selectable in disabledDate, and how can you make that day an optional

Mar.29,2021

Don't you just push the date forward one day when you disable it.


https://github.com/Bubblings/. this is easy to use. You can achieve the required functions by controlling min and max attributes.


disabledStartDate = (current) => {
    return current < moment().add(-1, 'd');
} 
Menu