Element-UI限制选择过去时间

:picker-options=“pickerOptions”

  <el-date-picker
    v-model="date"
    :style="`width:${width}px`"
    type="date"
    format="yyyy-MM-dd"
    :disabled="disabled"
    :value-format="valueFormat"
    class="date-day-box"
    placeholder="选择日期"
    :picker-options="pickerOptions"
    @change="handleChange"
  />

data

  data() {
     
    return {
     
      date: '',
      pickerOptions: {
     
        disabledDate(time) {
     
          return time.getTime() < Date.now() - 8.64e7
        }
      }
    }
  },

你可能感兴趣的:(element-ui)