Skip to content

Commit 8d7e7bb

Browse files
committed
Required functionality that raises the _selectDate event when the UI loses focus and hides.
1 parent 2fa8edb commit 8d7e7bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,13 @@ $.extend(Datepicker.prototype, {
812812
!$target.hasClass($.datepicker.markerClassName) &&
813813
!$target.hasClass($.datepicker._triggerClass) &&
814814
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
815+
816+
/* Support for month/year selection only, to modify raise the date selection event when the UI loses focus */
817+
var inst = $.advdatepicker._getInst(event.currentTarget.activeElement);
818+
if (!$.advdatepicker._get(inst, 'changeDays')) {
819+
820+
$.advdatepicker._selectDate('#' + inst.id, $.advdatepicker._formatDate($.advdatepicker._curInst, $.advdatepicker._curInst.currentDay, $.advdatepicker._curInst.drawMonth, $.advdatepicker._curInst.drawYear));
821+
}
815822
$.datepicker._hideDatepicker();
816823
},
817824

0 commit comments

Comments
 (0)