HTML5 “time” input interval

后端 未结 1 1022
广开言路
广开言路 2021-01-02 23:28

Maybe i am just not searching properly, but does anyone know of a way to have the time input only increment using the spinner based on a preset interval. So if it is 10 minu

相关标签:
1条回答
  • 2021-01-03 00:17

    Sure, just use the step attribute, where the step specifies the number of seconds to increment (60 sec x 10 mins = 600 seconds):

    <input type="time" value="08:30:00" step="600">
    

    jsFiddle example

    0 讨论(0)
提交回复
热议问题