React-ant-design date selection box time selection limit

1.
Expected effect
Insert picture description here
Insert picture description here

Insert picture description here
2. The restriction to be added is that the start time cannot be less than a date, and the end time cannot exceed today.
3. Implementation code

    this.handleDisabledStartDate = current => {
    
    
      return current < moment(e.props.title) || current > moment(lastEndDate);
    };
    this.handleDisabledEndDate = current => {
    
    
      return current < moment(e.props.title) || current > moment(lastEndDate);
    };

4, where time is the time when the comparison string noted when comparing the timestamp need to be converted
in more detail be reference herein in detail

Guess you like

Origin blog.csdn.net/weixin_45416217/article/details/107093812
Recommended