Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(datapicker): set popup initial position in append-to-body case
Browse files Browse the repository at this point in the history
Set the initial position offsets of the datepicker popup element in case of appended to 'body'.

Todo: refresh the position on parent elements resize.
  • Loading branch information
stan-z authored and pkozlowski-opensource committed Oct 11, 2013
1 parent 5d9bd05 commit 78a1e9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/datepicker.js
Expand Up @@ -414,7 +414,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
}

function updatePosition() {
scope.position = $position.position(element);
scope.position = appendToBody ? $position.offset(element) : $position.position(element);
scope.position.top = scope.position.top + element.prop('offsetHeight');
}

Expand Down

0 comments on commit 78a1e9d

Please sign in to comment.