Timepicker Javascript 以不正确的方式显示时间
Timepicker Javascript displays time in incorrect way
我的 HTML 中有一个时间选择器 div 标签:
<input class="timepicker" name="timepicker" id="from-timepicker"/>
相应的 Javascript 代码是:
$('#from-timepicker').timepicker({
timeFormat: 'HH:mm',
// year, month, day and seconds are not important
minTime: new Date(0, 0, 0, 8, 0, 0),
maxTime: new Date(0, 0, 0, 15, 0, 0),
// time entries start being generated at 6AM but the plugin
// shows only those within the [minTime, maxTime] interval
startHour: 6,
// the value of the first item in the dropdown, when the input
// field is empty. This overrides the startHour and startMinute
// options
startTime: new Date(0, 0, 0, 8, 20, 0),
// items in the dropdown are separated by at interval minutes
interval: 10
});
在 UI 上,我将时间视为:
0808:mm
I need it in 08:08 (hh:mm) format.
知道我哪里出错了吗?
时间选择器格式:'timeFormat': 'h:i'
timepicker.jquery 使用 php.
的时间部分
我的 HTML 中有一个时间选择器 div 标签:
<input class="timepicker" name="timepicker" id="from-timepicker"/>
相应的 Javascript 代码是:
$('#from-timepicker').timepicker({
timeFormat: 'HH:mm',
// year, month, day and seconds are not important
minTime: new Date(0, 0, 0, 8, 0, 0),
maxTime: new Date(0, 0, 0, 15, 0, 0),
// time entries start being generated at 6AM but the plugin
// shows only those within the [minTime, maxTime] interval
startHour: 6,
// the value of the first item in the dropdown, when the input
// field is empty. This overrides the startHour and startMinute
// options
startTime: new Date(0, 0, 0, 8, 20, 0),
// items in the dropdown are separated by at interval minutes
interval: 10
});
在 UI 上,我将时间视为:
0808:mm
I need it in 08:08 (hh:mm) format.
知道我哪里出错了吗?
时间选择器格式:'timeFormat': 'h:i'
timepicker.jquery 使用 php.
的时间部分