aboutsummaryrefslogtreecommitdiffstats
path: root/ui
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 10:59:08 -0500
commiteffdd5d19c534f8445ebafe4212278c4366b0041 (patch)
tree195ebacb5b097c1077b972617ad09977df3d062e /ui
parenta56aa861b1deb6d71ec74a77647d12d50570ea57 (diff)
downloadjquery-ui-effdd5d19c534f8445ebafe4212278c4366b0041.tar.gz
jquery-ui-effdd5d19c534f8445ebafe4212278c4366b0041.zip
Datepicker: Added onSelect.apply() call to _setDate method if onSelect is defined. Fixed #6264 - Datepicker: onSelect does not fire when setDate is called
Diffstat (limited to 'ui')
-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 442621e0d..dda8585fd 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1399,6 +1399,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. */