输入类型时间超过24小时 [英] input type time with more than 24 hour options
问题描述
我想使用时间输入来允许用户选择视频中的准确时间(对于某些非常长的视频). 我不希望输入将选择范围限制为最大23:59:59,是否可以选择例如46:59:10?
I want to use a time input to allow user to select a precise time in a video (on some really long videos). I don't want the input to limit the selection to max 23:59:59, is it possible to select for eg 46:59:10 ?
即.在几分钟和几秒钟的时间内保持原始行为,但允许小时数超过23吗?
ie. keeping to original behavior on minutes and seconds part but allow hours to go past 23 ?
我尝试设置max="10000:00:00"
,但这不会改变输入行为.
I tried setting max="10000:00:00"
but that doesn't change the input behavior.
更通用的用例是允许输入的持续时间可能大于1天
A more general use case would be to allow duration input that may be bigger than 1 day
<label>Select a duration: <input type="time" step="1"/></label>
推荐答案
除此方法外,我想不出任何简单的方法,只有两个input
:
I can't think of any easy way except this one, with two input
s:
/* Standardize the different styles of the inputs */
input {
box-sizing: border-box;
height: 2em;
}
<label>Select a duration (days and time):</label><br>
<input type="number" min="0" max="100" value="0" /><input type="time" step="1" />
希望对您有帮助.
这篇关于输入类型时间超过24小时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!