antd 的 RangePicker 中日期范围
作者:互联网
<FormItem label="登记时间" className="four-word-padding">
{getFieldDecorator('dates', {
initialValue: dates,
})(<RangePicker disabledDate={disabledDate} format="YYYY-MM-DD" />)}
</FormItem>
const disabledDate = current => {
// return current.valueOf() > Date.now();
// return moment() < moment(current);//当天之前
return !(current < moment().endOf('day') && current > moment().subtract(3, 'month')); // 近三月
};
标签:dates,return,DD,moment,RangePicker,current,日期,disabledDate,antd 来源: https://blog.csdn.net/waillyer/article/details/116926901