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)
This commit is contained in:
Scott González 2011-02-15 08:38:09 -05:00
parent 9191ee3cd8
commit cf9dac6c17

View File

@ -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();