From b4ef2f7ebb1162f75d8fa3276d73e4746bcace84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Maciej=20Mrozi=C5=84ski?= Date: Mon, 16 Jul 2012 13:09:52 +0200 Subject: [PATCH] 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. --- ui/jquery.ui.datepicker.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 06db79ba7..4c260a1c8 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -708,6 +708,9 @@ $.extend(Datepicker.prototype, { /* Generate the date picker content. */ _updateDatepicker: function(inst) { + if ($.datepicker._curInst && inst != $.datepicker._curInst) { + return; + } this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) var borders = $.datepicker._getBorders(inst.dpDiv); instActive = inst; // for delegate hover events -- 2.39.5