summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Boike <david.boike@gmail.com>2010-11-30 13:32:36 -0600
committerDavid Boike <david.boike@gmail.com>2010-11-30 13:32:36 -0600
commit3266d91cd90e5c328c6a4684671dc3fc13d3e16b (patch)
treea621ec784e1b71153ec9c47ec51eacc23ab34fff
parent3d8b9dc19394d7d1477abf064b718f2c8836201b (diff)
downloadjQuery-Timepicker-Addon-3266d91cd90e5c328c6a4684671dc3fc13d3e16b.zip
jQuery-Timepicker-Addon-3266d91cd90e5c328c6a4684671dc3fc13d3e16b.tar.gz
jQuery-Timepicker-Addon-3266d91cd90e5c328c6a4684671dc3fc13d3e16b.tar.bz2
Fixed an issue where a text field containing a time with hour 23 or minute 59 (the highest possible values) would cause the calendar date to reset to 1869 when the picker is displayed.
-rw-r--r--jquery-ui-timepicker-addon.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index d1c46c9..5b22676 100644
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -220,9 +220,9 @@ $.extend(Timepicker.prototype, {
// Added by Peter Medeiros:
// - Figure out what the hour/minute/second max should be based on the step values.
// - Example: if stepMinute is 15, then minMax is 45.
- hourMax = o.hourMax - (o.hourMax % o.stepHour),
- minMax = o.minuteMax - (o.minuteMax % o.stepMinute),
- secMax = o.secondMax - (o.secondMax % o.stepSecond),
+ hourMax = (o.hourMax - (o.hourMax % o.stepHour)).toFixed(0),
+ minMax = (o.minuteMax - (o.minuteMax % o.stepMinute)).toFixed(0),
+ secMax = (o.secondMax - (o.secondMax % o.stepSecond)).toFixed(0),
dp_id = this.inst.id.toString().replace(/([^A-Za-z0-9_])/g, '');
// Prevent displaying twice