Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Datepicker: Fixed position problem when input is in a fixed element. …

…Fixes #5626 - DatePicker doesn't work inside fixed div.
  • Loading branch information...
commit 147ec7bd624e631fe019973876ad587e85d112bf 1 parent cb44dc6
@luisdalmolin luisdalmolin authored scottgonzalez committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.datepicker.js
View
4 ui/jquery.ui.datepicker.js
@@ -766,8 +766,8 @@ $.extend(Datepicker.prototype, {
var dpHeight = inst.dpDiv.outerHeight();
var inputWidth = inst.input ? inst.input.outerWidth() : 0;
var inputHeight = inst.input ? inst.input.outerHeight() : 0;
- var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
- var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
+ var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
+ var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
Please sign in to comment.
Something went wrong with that request. Please try again.