怎么自定义可选范围 在一个闭区间呢 比如说过去的一个月? (满足endDate 大于 startDate 肯定是必须的)
需要满足上述的条件肯定是要disableDate 方法每次都要满足两个条件
可
disabledEndDate = (current) => {
const startDate = this.state.startDate;
if (!current || !startDate) {
return false;
}
return current.valueOf() < startDate.valueOf();
}
return的 结果中使用&& 无效 无法满足使可选取范围即大于一个时间点, 又小于一个时间点
求指导!
return 中把 && 变成 || 即可
========================================================
开始之前日期禁用,结束之后日期禁用,并且禁用了开始到结束日期中的某一天