common.js 612 Bytes
/**
 * 时间控件-限制月份
 */
export const beforeRangePickerOptions = {
  disabledDate(date) {
    if (date > new Date()) {
      return true
    }
    return false
  }
}
export const afterRangePickerOptions = {
  disabledDate(date) {
    const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
    if (date < yesterday) {
      return true
    }
    return false
  }
}

export const afterTodayRangePickerOptions = {
  disabledDate(date) {
    const yesterday = new Date(new Date().setDate(new Date().getDate()))
    if (date < yesterday) {
      return true
    }
    return false
  }
}