aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.datepicker.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.datepicker.js')
-rw-r--r--ui/ui.datepicker.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index 17b483281..3aa138e0f 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -665,7 +665,7 @@ $.extend(Datepicker.prototype, {
var onClose = this._get(inst, 'onClose');
if (onClose)
onClose.apply((inst.input ? inst.input[0] : null),
- [this._getDate(inst), inst]); // trigger custom callback
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
this._datepickerShowing = false;
this._lastInput = null;
inst.settings.prompt = null;
@@ -1577,7 +1577,7 @@ $.extend(Datepicker.prototype, {
var onChange = this._get(inst, 'onChangeMonthYear');
if (onChange)
onChange.apply((inst.input ? inst.input[0] : null),
- [new Date(inst.selectedYear, inst.selectedMonth, 1), inst]);
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
},
/* Determine the number of months to show. */