From f80d8c124d3697f7dd0384b1593d6eb738936428 Mon Sep 17 00:00:00 2001 From: Trent Date: Wed, 8 Jun 2011 17:40:43 -0400 Subject: [PATCH] Add fix by alexandergitter to fix grid numbering --- jquery-ui-timepicker-addon.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index f17b3c7..191e2ac 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -291,7 +291,7 @@ $.extend(Timepicker.prototype, { '
' + '
'; - for (var h = o.hourMin; h < hourMax; h += o.hourGrid) { + for (var h = o.hourMin; h <= hourMax; h += o.hourGrid) { hourGridSize++; var tmph = (o.ampm && h > 12) ? h-12 : h; if (tmph < 10) tmph = '0' + tmph; @@ -317,7 +317,7 @@ $.extend(Timepicker.prototype, { ((o.showMinute) ? '' : noDisplay) + '>' + '
'; - for (var m = o.minuteMin; m < minMax; m += o.minuteGrid) { + for (var m = o.minuteMin; m <= minMax; m += o.minuteGrid) { minuteGridSize++; html += ''; } @@ -336,7 +336,7 @@ $.extend(Timepicker.prototype, { ((o.showSecond) ? '' : noDisplay) + '>' + '
' + ((m < 10) ? '0' : '') + m + '
'; - for (var s = o.secondMin; s < secMax; s += o.secondGrid) { + for (var s = o.secondMin; s <= secMax; s += o.secondGrid) { secondGridSize++; html += ''; }
' + ((s < 10) ? '0' : '') + s + '