summaryrefslogtreecommitdiffstats
path: root/dist/jquery-ui-timepicker-addon.js
diff options
context:
space:
mode:
authorTrent Richardson <trentdrichardson@gmail.com>2013-11-21 13:21:40 -0500
committerTrent Richardson <trentdrichardson@gmail.com>2013-11-21 13:21:40 -0500
commit953cd46719d716e02dbef0a2876242daf21b0f52 (patch)
tree727e1eabe016fe492fbdd7c91cc3ee259ded2407 /dist/jquery-ui-timepicker-addon.js
parent2c1abab8ffd64189c0a3d0dde5bd45331771ff95 (diff)
downloadjQuery-Timepicker-Addon-953cd46719d716e02dbef0a2876242daf21b0f52.zip
jQuery-Timepicker-Addon-953cd46719d716e02dbef0a2876242daf21b0f52.tar.gz
jQuery-Timepicker-Addon-953cd46719d716e02dbef0a2876242daf21b0f52.tar.bz2
Issue 644 - hasChanged uses strict comparisons so we need to ensure datatype
Diffstat (limited to 'dist/jquery-ui-timepicker-addon.js')
-rw-r--r--dist/jquery-ui-timepicker-addon.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/dist/jquery-ui-timepicker-addon.js b/dist/jquery-ui-timepicker-addon.js
index b1c038c..912c53e 100644
--- a/dist/jquery-ui-timepicker-addon.js
+++ b/dist/jquery-ui-timepicker-addon.js
@@ -744,15 +744,22 @@
microsec = parseInt(microsec, 10);
}
if (timezone !== false) {
- timezone = parseInt(timezone, 10);
+ timezone = timezone.toString();
}
var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0];
// If the update was done in the input field, the input field should not be updated.
// If the update was done using the sliders, update the input field.
- var hasChanged = (hour !== this.hour || minute !== this.minute || second !== this.second || millisec !== this.millisec || microsec !== this.microsec ||
- (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || (this.timezone !== null && timezone !== this.timezone));
+ var hasChanged = (
+ hour !== parseInt(this.hour,10) ||
+ minute !== parseInt(this.minute,10) ||
+ second !== parseInt(this.second,10) ||
+ millisec !== parseInt(this.millisec,10) ||
+ microsec !== parseInt(this.microsec,10) ||
+ (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) ||
+ (this.timezone !== null && timezone !== this.timezone.toString())
+ );
if (hasChanged) {