summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2010-10-01 10:00:36 -0400
committerTrent Richardson <trentdrichardson@gmail.com>2010-10-01 10:00:36 -0400
commit43f319fa6c8ec7adae330d67b75ae405d832b27c (patch)
tree3b4ec765fa3e667c74c565b39a45b47d161e4c44
parent6e55e5fc6a75fdde6b4a0b97561b6a6d8356ad4d (diff)
downloadjQuery-Timepicker-Addon-43f319fa6c8ec7adae330d67b75ae405d832b27c.zip
jQuery-Timepicker-Addon-43f319fa6c8ec7adae330d67b75ae405d832b27c.tar.gz
jQuery-Timepicker-Addon-43f319fa6c8ec7adae330d67b75ae405d832b27c.tar.bz2
fixed issue going from 11am to 12pm
-rwxr-xr-xjquery-ui-timepicker-addon.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js
index f4862e8..600aab6 100755
--- a/jquery-ui-timepicker-addon.js
+++ b/jquery-ui-timepicker-addon.js
@@ -249,7 +249,8 @@
var hour = tp_inst.hour_slider.slider('value');
var minute = tp_inst.minute_slider.slider('value');
var second = tp_inst.second_slider.slider('value');
- var ampm = (hour < 12) ? 'AM' : 'PM';
+ var ampm = (hour < 11.5) ? 'AM' : 'PM';
+ hour = (hour >= 11.5 && hour < 12) ? 12 : hour;
var hasChanged = false;
// If the update was done in the input field, this field should not be updated.