鍍金池/ 問(wèn)答/網(wǎng)絡(luò)安全  HTML/ antd DatePicker DisabledDate 怎么自定義可選范圍 在

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

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

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

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

return的 結(jié)果中使用&& 無(wú)效 無(wú)法滿足使可選取范圍即大于一個(gè)時(shí)間點(diǎn), 又小于一個(gè)時(shí)間點(diǎn)

求指導(dǎo)!

回答
編輯回答
失心人

disabledEndDate+ disabledStartDate

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

這個(gè)問(wèn)題解決了嗎?我也遇到這個(gè)問(wèn)題了

2017年3月27日 13:23