From a3cba34a4d99756e7590fee391fee1bdf06d8a5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 15 Feb 2011 08:38:09 -0500 Subject: [PATCH] Datepicker: Properly handle datepickers attached to inputs that are hidden using CSS. Fixes #6988 - Datepicker: Treat all hidden text fields the same. --- ui/jquery.ui.datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.39.5