Skip to content

Commit e96f726

Browse files
committed
Fixes enable/disable timepicker
Due to the fact that each datetimepicker instance has its own settings these have to be updated accordingly on enable or disable.
1 parent a34caa8 commit e96f726

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/jquery-ui-timepicker-addon.js

+2
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,7 @@
14851485
var tp_inst = this._get(inst, 'timepicker');
14861486
$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
14871487
if (tp_inst) {
1488+
inst.settings.showTimepicker = false;
14881489
tp_inst._defaults.showTimepicker = false;
14891490
tp_inst._updateDateTime(inst);
14901491
}
@@ -1499,6 +1500,7 @@
14991500
var tp_inst = this._get(inst, 'timepicker');
15001501
$(target).datepicker('getDate'); // Init selected[Year|Month|Day]
15011502
if (tp_inst) {
1503+
inst.settings.showTimepicker = true;
15021504
tp_inst._defaults.showTimepicker = true;
15031505
tp_inst._addTimePicker(inst); // Could be disabled on page load
15041506
tp_inst._updateDateTime(inst);

0 commit comments

Comments
 (0)