Datepicker: Fixed #5085 bug in findPos for RTL languages

This commit is contained in:
Keith Wood 2010-01-22 10:10:17 +00:00
parent ee87defcca
commit 4e81523227

View File

@ -730,8 +730,10 @@ $.extend(Datepicker.prototype, {
/* Find an object's position on the screen. */
_findPos: function(obj) {
var inst = this._getInst(obj);
var isRTL = this._get(inst, 'isRTL');
while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
obj = obj.nextSibling;
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
}
var position = $(obj).offset();
return [position.left, position.top];