[Vuejs]-How to change the TimePicker interval in element UI

0👍

The focus method of the component can be called with refs

   <el-time-select
  v-model="value"
  :picker-options="{
    start: '08:30',
    step: '00:10',
    end: '18:30'
  }"
refs="timePicker"
  placeholder="Select time">
</el-time-select>

 this.$refs.timePicker.focus()

0👍

the documentation you showed actually clearly shows how to implement it.
https://element.eleme.io/#/en-US/component/time-picker#timepicker

So you can use the picker-options prop and use the ‘step’ property for custom intervals

<el-time-select
  v-model="value"
  :picker-options="{
    start: '08:30',
    step: '00:10',
    end: '18:30'
  }"
  placeholder="Select time">
</el-time-select>

Leave a comment