Skip to content

Commit 25f8a6b

Browse files
committed
Fixed grid to start with minimum values (fixes Github Issue 38)
1 parent 88a0b94 commit 25f8a6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* jQuery timepicker addon
33
* By: Trent Richardson [http://trentrichardson.com]
44
* Version 0.8.1
5-
* Last Modified: 11/18/2010 by Charles Phillips
5+
* Last Modified: 11/20/2010 by Charles Phillips
66
*
77
* Copyright 2010 Trent Richardson
88
* Dual licensed under the MIT and GPL licenses.
@@ -238,7 +238,7 @@ $.extend(Timepicker.prototype, {
238238
'<div id="ui_tpicker_hour_' + dp_id + '"' + ((o.showHour) ? '' : noDisplay) + '></div>' +
239239
'<div style="padding-left: 1px"><table><tr>';
240240

241-
for (var h = 0; h < hourMax; h += o.hourGrid) {
241+
for (var h = o.hourMin; h < hourMax; h += o.hourGrid) {
242242
hourGridSize++;
243243
var tmph = (o.ampm && h > 12) ? h-12 : h;
244244
if (tmph < 10) tmph = '0' + tmph;
@@ -264,7 +264,7 @@ $.extend(Timepicker.prototype, {
264264
((o.showMinute) ? '' : noDisplay) + '></div>' +
265265
'<div style="padding-left: 1px"><table><tr>';
266266

267-
for (var m = 0; m < minMax; m += o.minuteGrid) {
267+
for (var m = o.minuteMin; m < minMax; m += o.minuteGrid) {
268268
minuteGridSize++;
269269
html += '<td>' + ((m < 10) ? '0' : '') + m + '</td>';
270270
}
@@ -283,7 +283,7 @@ $.extend(Timepicker.prototype, {
283283
((o.showSecond) ? '' : noDisplay) + '></div>' +
284284
'<div style="padding-left: 1px"><table><tr>';
285285

286-
for (var s = 0; s < secMax; s += o.secondGrid) {
286+
for (var s = o.secondMin; s < secMax; s += o.secondGrid) {
287287
secondGridSize++;
288288
html += '<td>' + ((s < 10) ? '0' : '') + s + '</td>';
289289
}

0 commit comments

Comments
 (0)