鍍金池/ 問答/網絡安全  HTML/ antd DatePicker DisabledDate 怎么自定義可選范圍 在

antd DatePicker DisabledDate 怎么自定義可選范圍 在一個閉區(qū)間呢 比如說過去的一個月?

怎么自定義可選范圍 在一個閉區(qū)間呢 比如說過去的一個月? (滿足endDate 大于 startDate 肯定是必須的)

需要滿足上述的條件肯定是要disableDate 方法每次都要滿足兩個條件

  disabledEndDate = (current) => {
    const startDate = this.state.startDate;
    if (!current || !startDate) {
      return false;
    }
    return current.valueOf() < startDate.valueOf();
  }

return的 結果中使用&& 無效 無法滿足使可選取范圍即大于一個時間點, 又小于一個時間點

求指導!

回答
編輯回答
失心人

disabledEndDate+ disabledStartDate

2017年6月15日 09:53
編輯回答
生性

這個問題解決了嗎?我也遇到這個問題了

2017年3月27日 13:23