HTML input time, step attribute to set timestep by (say) x minutes?

后端 未结 4 1888
南笙
南笙 2021-01-17 22:26

I have a time input, basically just:

Time:  

http://jsfiddle.net/X8E9N/

According to

4条回答
  •  遥遥无期
    2021-01-17 22:46

    Yes. You can specify step attribute in seconds.

    However, Opera, iOS Safari, and Google Chrome don't reject non-aligned user input. A user can specify 11:59 to such time field. Then, Opera and Google Chrome show a validation error message when he tries to submit the form.

提交回复
热议问题