aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authormarcneuwirth <marc.neuwirth@gmail.com>2011-06-28 10:59:08 -0500
committerCorey Frang <gnarf@gnarf.net>2011-06-28 11:00:06 -0500
commitb8e14e79e5bc630bf459137896c08fc37936f52f (patch)
treed39e2bc9c195a0fe627ddbdca967e80857f69545 /ui/jquery.ui.datepicker.js
parentbb9f9fac816dd379e810e8b70823bb7980250ffb (diff)
downloadjquery-ui-b8e14e79e5bc630bf459137896c08fc37936f52f.tar.gz
jquery-ui-b8e14e79e5bc630bf459137896c08fc37936f52f.zip
Datepicker: Added onSelect.apply() call to _setDate method if onSelect is defined. Fixed #6264 - Datepicker: onSelect does not fire when setDate is called
(cherry picked from commit effdd5d19c534f8445ebafe4212278c4366b0041)
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index 458ad01ec..3f3e73a70 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1386,6 +1386,14 @@ $.extend(Datepicker.prototype, {
if (inst.input) {
inst.input.val(clear ? '' : this._formatDate(inst));
}
+
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect) {
+ var dateStr = this._formatDate(inst);
+
+ // trigger custom callback
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
+ }
},
/* Retrieve the date(s) directly. */