html icon indicating copy to clipboard operation
html copied to clipboard

<input type="time"> : Time vs. duration

Open d-damien opened this issue 4 years ago • 24 comments

When you want to enter a duration less than a day, it will generally be better understood in HH:mm:ss format by the user. Using <input type="time" /> works well in a language that's on a 24H basis, but when trying it with a browser in english :

  • They have to enter AM/PM, which doesn't make sense in this context.
  • They cannot enter durations over 12:59.
  • Other use case : military time uses 24H cycles.

An easy workaround would be to have a way to override user's default to force 24H cycle. I think otherwise behavior is just the same as time. I'm not sure which of type="duration" or cycle="24h" would be best here.

d-damien avatar Apr 26 '20 23:04 d-damien