yichenxi
2022-12-12 936633659148e800a8d09322a9f1e646104010a7
src/components/Form/HourPicker1.vue
@@ -40,11 +40,12 @@
          this.timeOne = minDate.getTime() // 当选一个日期时 就是最小日期
          // // 如何你选择了两个日期了,就把那个变量置空
           if (maxDate) this.timeOne = ''
        },
        disabledDate: time => {
          if (this.timeOne) {
            const WEEK = 7 * 24 * 3600 * 1000 -1 // 这里乘以6相当于 限制7天以内
            const minTime = this.timeOne  // 七天之前
            const WEEK = 7 * 24 * 3600 * 1000 - 1 // 这里乘以6相当于 限制7天以内
            const minTime = this.timeOne // 七天之前
            const maxTime = this.timeOne + WEEK // 七天之后
            return time.getTime() < minTime || time.getTime() > maxTime || time.getTime() > new Date()
          } else {