Skip to content

Commit

Permalink
Merge pull request #69 from chuangbo/patch-1
Browse files Browse the repository at this point in the history
Fixed place error when not enough space under
  • Loading branch information
najlepsiwebdesigner committed Mar 2, 2015
2 parents c5cdaf2 + de05fb5 commit 094b832
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/foundation-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@
var fullOffsetTop = offset.top + height;
var offsetLeft = offset.left;
// if the datepicker is going to be below the window, show it on top of the input
if((fullOffsetTop + this.picker.height()) >= $(window).scrollTop() + $(window).height()){
fullOffsetTop = offset.top - height - this.picker.height();
if((fullOffsetTop + this.picker.outerHeight()) >= $(window).scrollTop() + $(window).height()){
fullOffsetTop = offset.top - this.picker.outerHeight();
}

// if the datepicker is going to go past the right side of the window, we want
Expand Down

0 comments on commit 094b832

Please sign in to comment.