angular-ui / bootstrap

PLEASE READ THE PROJECT STATUS BELOW. Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!
http://angular-ui.github.io/bootstrap/
MIT License
14.3k stars 6.74k forks source link

uib-datepkicker-popup Not apply to new added elements #6678

Closed morteza-gho closed 6 years ago

morteza-gho commented 6 years ago

I have a filed with uib-datepicker that added to DOM with jQuery after page load. Now when I focus to field, datepicker not shown!

create and append date picker field

var dateInput = 
   $compile("<input type='text' class='date-filter' 
   ng-model='dateFilter' 
   uib-datepicker-popup='yyyy-MM-dd' 
   is-open='datePicker[1]' 
   ng-focus='openDatePicker($event, 1)'>")($scope);

   $('#wapper').append(dateInput);

open datepicker

$scope.datePicker = [];
$scope.openDatePicker = function ($event, datePickerIndex) {
   $event.preventDefault();
   $event.stopPropagation();
   $scope.datePicker[datePickerIndex] = true;
};

It can be said: uib-datepicker not apply to filed at all!

What's the problem?

icfantv commented 6 years ago

Closing this as this project is no longer being maintained, per the README and the ISSUE_TEMPLATE.