html
html copied to clipboard
<input type="time"> : Time vs. duration
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.