【问题标题】:input type time with more than 24 hour options输入类型时间超过 24 小时选项
【发布时间】:2018-10-10 09:37:03
【问题描述】:

我想使用时间输入来允许用户选择视频中的精确时间(在一些非常长的视频上)。 我不希望输入将选择限制为最大 23:59:59,是否可以选择例如 46:59:10?

即。在分钟和秒部分保持原始行为,但允许小时过去 23?

我尝试设置max="10000:00:00",但这并没有改变输入行为。

更一般的用例是允许输入可能大于 1 天的持续时间

<label>Select a duration: <input type="time" step="1"/></label>

【问题讨论】:

标签: html forms input


【解决方案1】:

除了这个,我想不出任何简单的方法,两个inputs:

/* 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" />

希望对你有帮助。

【讨论】:

  • 对于更大的事情来说,这是一个不错的曲目。你认为只有分钟和秒是可能的吗?所以我可以为小时设置一个数字字段,为分钟/秒设置一个时间字段。
猜你喜欢
  • 2019-02-12
  • 2015-09-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-11-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多