diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index e001169125..c995dad9f3 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -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'); }