Skip to content

Commit 320653c

Browse files
Update to trentrichardson#753 to fix closing and odd focusing on input
1 parent 9cfc82b commit 320653c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dist/jquery-ui-timepicker-addon.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1387,14 +1387,17 @@
13871387
$.datepicker._base_selectDate = $.datepicker._selectDate;
13881388
$.datepicker._selectDate = function (id, dateStr) {
13891389
var inst = this._getInst($(id)[0]),
1390-
tp_inst = this._get(inst, 'timepicker');
1390+
tp_inst = this._get(inst, 'timepicker'),
1391+
was_inline;
13911392

13921393
if (tp_inst && inst.settings.showTimepicker) {
13931394
tp_inst._limitMinMaxDateTime(inst, true);
1395+
was_inline = inst.inline;
13941396
inst.inline = inst.stay_open = true;
13951397
//This way the onSelect handler called from calendarpicker get the full dateTime
13961398
this._base_selectDate(id, dateStr);
1397-
inst.inline = inst.stay_open = false;
1399+
inst.inline = was_inline;
1400+
inst.stay_open = false;
13981401
this._notifyChange(inst);
13991402
this._updateDatepicker(inst);
14001403
} else {
@@ -1529,7 +1532,7 @@
15291532
selectLocalTimezone(tp_inst);
15301533
var now = new Date();
15311534
this._setTime(inst, now);
1532-
$('.ui-datepicker-today', $dp).click();
1535+
this._setDate(inst, now);
15331536
};
15341537

15351538
/*

0 commit comments

Comments
 (0)