diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js
index 130ada20d4..4e5403ca22 100644
--- a/src/datepicker/datepicker.js
+++ b/src/datepicker/datepicker.js
@@ -306,12 +306,12 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
};
// popup element used to display calendar
- var popupEl = angular.element('');
+ var popupEl = angular.element('
');
popupEl.attr({
'ng-model': 'date',
'ng-change': 'dateSelection()'
});
- var datepickerEl = popupEl.find('datepicker');
+ var datepickerEl = popupEl.find('div');
if (attrs.datepickerOptions) {
datepickerEl.attr(angular.extend({}, originalScope.$eval(attrs.datepickerOptions)));
}
@@ -433,7 +433,7 @@ function ($compile, $parse, $document, $position, dateFilter, datepickerPopupCon
.directive('datepickerPopupWrap', [function() {
return {
- restrict:'E',
+ restrict:'A',
replace: true,
transclude: true,
templateUrl: 'template/datepicker/popup.html',