效果:
官网文档
需要使用到moment
import moment from 'moment';
//修改的时间限制
disabledDateUpdate = (current) => {
return current && current < moment(this.state.updateCreateDate).endOf('day');
}
//当日之后不可选(不包含当日)
disabledDate (current) {
return current && current > moment().endOf('day');
},
//当日之前不可选(包含当日)
disabledDate (current) {
return current && current < moment().endOf('day')
},
//当日之前不可选(不包含当日)
disabledDate (current) {
return current < moment().subtract(1, 'day')
}