Skip to content

Commit b4ef2f7

Browse files
Maciej Mrozińskiscottgonzalez
authored andcommitted
Datepicker: Modified _updateDatepicker to not update display if updated instance is not current instance. Fixed #6814 - datepicker('setDate') incorrectly overwrites current display with two datepickers.
1 parent 75105f6 commit b4ef2f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ $.extend(Datepicker.prototype, {
708708

709709
/* Generate the date picker content. */
710710
_updateDatepicker: function(inst) {
711+
if ($.datepicker._curInst && inst != $.datepicker._curInst) {
712+
return;
713+
}
711714
this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
712715
var borders = $.datepicker._getBorders(inst.dpDiv);
713716
instActive = inst; // for delegate hover events

0 commit comments

Comments
 (0)