如何在没有AM / PM的情况下使用datetime-local? [英] how can I use datetime-local without AM/PM?
问题描述
我想使用下面的代码:
< input type =datetime-localname = datevalue =/>
并且希望它没有AM / PM(24小时制)。
任何想法?
谢谢,
Dana
datetime-local
输入类型指定没有时区的本地时间,值是符合ISO 8601标准的格式,没有AM / PM。由实现决定可以在用户界面中使用的本地化格式。是否有AM / PM指示符不在作者的控制范围之内。
在我的环境中,我经常使用的浏览器中,只有Chrome对日期时间本地
。这在质量上是有问题的(使用ISO 8601格式),但重点是没有AM / PM,甚至没有进入它的可能性。您的里程会因您浏览器的语言和/或操作系统设置而异。
I'd like to use the following code:
<input type="datetime-local" name="date" value="" />
and would like it to be without AM/PM (24Hour based). Any Ideas?
Thanks,
Dana
The datetime-local
input type specifies a local time without time zone, and the internal representation of the value is in ISO 8601 conformant format, which has no AM/PM. It is left to implementations to decide what localized format might be used in the user interface. Whether they have AM/PM designator is outside the author’s control.
In my environment, of the browsers I regularly use, only Chrome has real support to datetime-local
. It’s qualitatively questionable (using ISO 8601 format), but the point is that has no AM/PM, or even a possibility of entering it. Your mileage will vary, by the language of your browser and/or operating system settings.
这篇关于如何在没有AM / PM的情况下使用datetime-local?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!