-2

我有 jQuery.ptTimeSelect 插件,这似乎对我的项目有好处。不确定是否有 24 小时时间格式,因为我遇到的示例 [http://pttimeselect.sourceforge.net/example/index.html][1]

[1]:http://pttimeselect.sourceforge.net/example/index.html只有 12 小时的时间格式。

下面是来自上述网站的代码片段

$('input[name="time"]')
    .ptTimeSelect({
        containerClass: undefined,
        containerWidth: undefined,
        hoursLabel:     'Hour',
        minutesLabel:   'Minutes',
        setButtonLabel: 'Set',
        popupImage:     undefined,
        onFocusDisplay: true,
        zIndex:         10,
        onBeforeShow:   undefined,
        onClose:        undefined
    });
4

2 回答 2

1

在用于 24 小时的选项中:

timeFormat: "HH:mm"

中午 12 点:

timeFormat: "hh:mm"

或使用H:i24 小时和h:i12 小时

确切的选项和格式取决于您的库/插件,但主要是因为hand H.

data-options=\'{"mode": "timebox", "overrideTimeFormat": 24, "timeFormat": "H:i"}\'
于 2013-10-16T11:29:37.523 回答
0

在此处查找 24 小时 Jquery 时间格式

于 2015-06-22T09:41:22.220 回答