javascriptcssvue.jselement-ui

How to change the TimePicker interval in element UI


May I ask if the preset minute interval of the TimePicker in element UI is every minute, how to change it to every 10 minutes as an interval? I hope to get your help, it is quite distressing. thanks

[element UI][1] 
https://element.eleme.io/#/zh-CN/component/time-picker


[myCode][2]
https://codepen.io/hong-wei/pen/abKqpZY


  [1]: https://element.eleme.io/#/zh-CN/component/time-picker
  [2]: https://codepen.io/hong-wei/pen/abKqpZY

Solution

  • 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()