且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在bootstrap timepicker中使用24小时时间

更新时间:2023-02-26 16:25:00

编辑:这个帖子有比这个更好的答案。在我回答的时候,我只是掌握了JavaScript。具体来说,请参阅这些 两个

There are much better answers on this thread than this one. I was just getting the hang of JavaScript at the time I answered. Specifically, see these two.

如果你在该脚本的开发版本中搜索,那么有一个名为 use24hours 的函数对于值为true或false。

If you search within the development version of that script, there's a function called use24hours that looks for a value of either true or false.

添加 use24hours:true 可能会为您完成这项工作。像这样:

Adding use24hours:true might do the job for you. Like so:

$(function () {
    $('#datetimepicker5').datetimepicker({
        use24hours: true
    });
});