Skip to content

Commit bc166e4

Browse files
committed
Fixed exception thrown by onTimeChange
After disabling a timepicker an exception is thrown, if you close the now timepicker-less datepicker.
1 parent e96f726 commit bc166e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/jquery-ui-timepicker-addon.js

+3
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@
702702
* on time change is also called when the time is updated in the text field
703703
*/
704704
_onTimeChange: function () {
705+
if (!this._defaults.showTimepicker) {
706+
return;
707+
}
705708
var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false,
706709
minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false,
707710
second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false,

0 commit comments

Comments
 (0)