diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.datepicker.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 1d3de7740..442621e0d 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -529,6 +529,13 @@ $.extend(Datepicker.prototype, { $.datepicker._currentClass + ')', inst.dpDiv); if (sel[0]) $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + var onSelect = $.datepicker._get(inst, 'onSelect'); + if (onSelect) { + var dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } else $.datepicker._hideDatepicker(); return false; // don't submit the form |