Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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 minutes, have the up arrow go +10 mins, if the hour changes it would automatically go + an hour

8:50 - Up arrow hit ends with 9:00 -OR- 8:50 - Down arrow hit ends with 8:40

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
364 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...