Skip to content

Commit a3cba34

Browse files
committed
Datepicker: Properly handle datepickers attached to inputs that are hidden using CSS. Fixes #6988 - Datepicker: Treat all hidden text fields the same.
1 parent c4a7f45 commit a3cba34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ $.extend(Datepicker.prototype, {
754754
_findPos: function(obj) {
755755
var inst = this._getInst(obj);
756756
var isRTL = this._get(inst, 'isRTL');
757-
while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
757+
while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
758758
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
759759
}
760760
var position = $(obj).offset();

0 commit comments

Comments
 (0)