javascript - The DateTimePicker of element ui can only limit the time to the date, not the specific time?
仅有的幸福
仅有的幸福 2017-06-12 09:29:23
0
1
1712

As the title says,

I have restricted the selection to a time beyond the current time. There is no problem with date restrictions, but I cannot restrict it to specific hours, minutes and seconds, so I can select the future. time.

code show as below:

<template>
    <el-date-picker
      v-model="endDate"
      type="datetime"
      :clearable="false"
      :picker-options="endPickerOptions"
      placeholder="选择结束时间">
    </el-date-picker>
</template>
endPickerOptions: {
   disabledDate(time) {
       let timeSpace = time.getTime() > Date.now());
            return timeSpace;
        }
    }

Have you ever experienced this pitfall, please give me some guidance?

仅有的幸福
仅有的幸福

reply all(1)
学霸

I also encountered this problem, how did you solve it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template