输入类型时间超过24小时 [英] input type time with more than 24 hour options

查看:69
本文介绍了输入类型时间超过24小时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用时间输入来允许用户选择视频中的准确时间(对于某些非常长的视频). 我不希望输入将选择范围限制为最大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 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" />

希望对您有帮助.

这篇关于输入类型时间超过24小时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆