summaryrefslogtreecommitdiffstats
path: root/src/jquery-ui-timepicker-addon.js
diff options
context:
space:
mode:
authorMatthias Althaus <contact@althaus.it>2013-08-09 12:52:06 +0200
committerMatthias Althaus <contact@althaus.it>2013-08-09 12:52:06 +0200
commitbc166e45e35fa89ee53a502dfe9d4a09d88567ab (patch)
tree8d5fa07c12328ffa8428d745130bad06d0e12e69 /src/jquery-ui-timepicker-addon.js
parente96f726b82da575522ec6718a49a6ede27f009d8 (diff)
downloadjQuery-Timepicker-Addon-bc166e45e35fa89ee53a502dfe9d4a09d88567ab.zip
jQuery-Timepicker-Addon-bc166e45e35fa89ee53a502dfe9d4a09d88567ab.tar.gz
jQuery-Timepicker-Addon-bc166e45e35fa89ee53a502dfe9d4a09d88567ab.tar.bz2
Fixed exception thrown by onTimeChange
After disabling a timepicker an exception is thrown, if you close the now timepicker-less datepicker.
Diffstat (limited to 'src/jquery-ui-timepicker-addon.js')
-rw-r--r--src/jquery-ui-timepicker-addon.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/jquery-ui-timepicker-addon.js b/src/jquery-ui-timepicker-addon.js
index d7ad2bd..484ada9 100644
--- a/src/jquery-ui-timepicker-addon.js
+++ b/src/jquery-ui-timepicker-addon.js
@@ -702,6 +702,9 @@
* on time change is also called when the time is updated in the text field
*/
_onTimeChange: function () {
+ if (!this._defaults.showTimepicker) {
+ return;
+ }
var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,