From: Scott González Date: Tue, 15 Feb 2011 13:38:09 +0000 (-0500) Subject: Datepicker: Properly handle datepickers attached to inputs that are hidden using... X-Git-Tag: 1.8.10~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf9dac6c1704150d40191573767e5bfa58dcd9d2;p=jquery-ui.git Datepicker: Properly handle datepickers attached to inputs that are hidden using CSS. Fixes #6988 - Datepicker: Treat all hidden text fields the same. (cherry picked from commit 6fbee255d8d895c7e84a4b2eaad2cfadc8a3425a) --- diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 018c6cf84..6c2e90795 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -754,7 +754,7 @@ $.extend(Datepicker.prototype, { _findPos: function(obj) { var inst = this._getInst(obj); var isRTL = this._get(inst, 'isRTL'); - while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) { + while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) { obj = obj[isRTL ? 'previousSibling' : 'nextSibling']; } var position = $(obj).offset();