You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

442 B

范围

  • order: 6

设置 disabledDate 方法,来确定不可选时段。

如上例:不可选择今天之后的日期。


import { Datepicker } from 'antd';

const disabledDate = function(current, value) {
  // can not select days after today
  return current.getTime() > Date.now();
};

ReactDOM.render(
  <Datepicker disabledDate={disabledDate} />
, document.getElementById('components-datepicker-demo-range'));