我的HTML中有一个timepicker 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
});
在用户界面上,我将时间视为:
0808:mm
I need it in 08:08 (hh:mm) format.
知道我哪里错了吗?
解决方法:
timepicker格式:’timeFormat’:’h:i’
timepicker.jquery使用php.的时间部分