Skip to content

Commit 4136f64

Browse files
committed
Added 'afterUpdate' event to datepicker component
1 parent 5bc57a8 commit 4136f64

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function Datepicker() {
9393
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
9494
beforeShow: null, // Function that takes an input field and
9595
// returns a set of custom settings for the date picker
96+
afterUpdate: null, //Define a callback function after a datepicker month Div is rendered
9697
onSelect: null, // Define a callback function when a date is selected
9798
onChangeMonthYear: null, // Define a callback function when the month or year is changed
9899
onClose: null, // Define a callback function when the datepicker is closed
@@ -722,6 +723,10 @@ $.extend(Datepicker.prototype, {
722723
origyearshtml = inst.yearshtml = null;
723724
}, 0);
724725
}
726+
727+
var afterUpdate = $.datepicker._get(inst, 'afterUpdate');
728+
extendRemove(inst.settings, (afterUpdate ? afterUpdate.apply(inst.input, [inst.input, inst]) : {}));
729+
725730
},
726731

727732
/* Retrieve the size of left and top borders for an element.

0 commit comments

Comments
 (0)