gpt4 book ai didi

javascript - 日期时间本地 24 小时格式

转载 作者:行者123 更新时间:2023-12-05 00:39:27 27 4
gpt4 key购买 nike

我想在我的日期时间选择器中使用 24 小时格式
这里是我的 View 代码,我使用的是简单的本地日期时间

<input id="start_date" type="datetime-local" class="form-control>

结果:
here's the result

我试过这个
<script type="text/javascript">
$('#clockPicker').timepicker({
'timeFormat':'H:i'
});
</script>

最佳答案

引用 Mozilla 引用,无法选择日期格式。

如果您想使用 24H 格式,您可以更改您的系统偏好。
日期格式取决于您的系统偏好。

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#:~:text=The%20value%20of%20the%20time%20input%20is%20always%20in%2024,always%20hh%3Amm%3Ass%20 .

关于javascript - 日期时间本地 24 小时格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62334449/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com