Fixed grid to start with minimum values (fixes Github Issue 38)
This commit is contained in:
parent
88a0b943bc
commit
25f8a6b46f
8
jquery-ui-timepicker-addon.js
vendored
8
jquery-ui-timepicker-addon.js
vendored
|
@ -2,7 +2,7 @@
|
||||||
* jQuery timepicker addon
|
* jQuery timepicker addon
|
||||||
* By: Trent Richardson [http://trentrichardson.com]
|
* By: Trent Richardson [http://trentrichardson.com]
|
||||||
* Version 0.8.1
|
* Version 0.8.1
|
||||||
* Last Modified: 11/18/2010 by Charles Phillips
|
* Last Modified: 11/20/2010 by Charles Phillips
|
||||||
*
|
*
|
||||||
* Copyright 2010 Trent Richardson
|
* Copyright 2010 Trent Richardson
|
||||||
* Dual licensed under the MIT and GPL licenses.
|
* Dual licensed under the MIT and GPL licenses.
|
||||||
|
@ -238,7 +238,7 @@ $.extend(Timepicker.prototype, {
|
||||||
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
|
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table><tr>';
|
'<div style="padding-left: 1px"><table><tr>';
|
||||||
|
|
||||||
for (var h = 0; h < hourMax; h += o.hourGrid) {
|
for (var h = o.hourMin; h < hourMax; h += o.hourGrid) {
|
||||||
hourGridSize++;
|
hourGridSize++;
|
||||||
var tmph = (o.ampm && h > 12) ? h-12 : h;
|
var tmph = (o.ampm && h > 12) ? h-12 : h;
|
||||||
if (tmph < 10) tmph = '0' + tmph;
|
if (tmph < 10) tmph = '0' + tmph;
|
||||||
|
@ -264,7 +264,7 @@ $.extend(Timepicker.prototype, {
|
||||||
((o.showMinute) ? '' : noDisplay) + '></div>' +
|
((o.showMinute) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table><tr>';
|
'<div style="padding-left: 1px"><table><tr>';
|
||||||
|
|
||||||
for (var m = 0; m < minMax; m += o.minuteGrid) {
|
for (var m = o.minuteMin; m < minMax; m += o.minuteGrid) {
|
||||||
minuteGridSize++;
|
minuteGridSize++;
|
||||||
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
|
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ $.extend(Timepicker.prototype, {
|
||||||
((o.showSecond) ? '' : noDisplay) + '></div>' +
|
((o.showSecond) ? '' : noDisplay) + '></div>' +
|
||||||
'<div style="padding-left: 1px"><table><tr>';
|
'<div style="padding-left: 1px"><table><tr>';
|
||||||
|
|
||||||
for (var s = 0; s < secMax; s += o.secondGrid) {
|
for (var s = o.secondMin; s < secMax; s += o.secondGrid) {
|
||||||
secondGridSize++;
|
secondGridSize++;
|
||||||
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
|
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue