根據(jù)官方提供的disabledDate屬性來設(shè)置可選區(qū)間,new Date 可以替換成固定時(shí)間節(jié)點(diǎn)如:newDate(1992-01-01)
disabledDate = (current) => {
console.log(new Date())
return current < moment(new Date()) || current > moment().endOf('day')
}
<DatePicker disabledDate={this.disabledDate} placeholder={['開始日期', '結(jié)束日期']} style={{ width: '100%' }} />

image.png