Skip to content

Commit 4e81523

Browse files
committed
Datepicker: Fixed #5085 bug in findPos for RTL languages
1 parent ee87def commit 4e81523

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,10 @@ $.extend(Datepicker.prototype, {
730730

731731
/* Find an object's position on the screen. */
732732
_findPos: function(obj) {
733+
var inst = this._getInst(obj);
734+
var isRTL = this._get(inst, 'isRTL');
733735
while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
734-
obj = obj.nextSibling;
736+
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
735737
}
736738
var position = $(obj).offset();
737739
return [position.left, position.top];

0 commit comments

Comments
 (0)