1

ng-repeat에서 날짜 선택 도구를 사용하려고했지만 datepicker가 ng-repeat 내부에서 작동하지 않습니다. 아무도이 문제를 해결할 수 있습니까?AngularJS UI-Bootstrap Datepicker가 ng-repeat에서 작동하지 않습니까?

다음

내 코드는,

<div ng-repeat="dt in dates"> 
    <div class="col-md-6"> 
    <p class="input-group"> 
     <input type="text" class="form-control" uib-datepicker-popup="{{format}}" ng-model="dt" is-open="popup1.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" alt-input-formats="altInputFormats" /> 
     <span class="input-group-btn"> 
     <button type="button" class="btn btn-default" ng-click="open1()"><i class="glyphicon glyphicon-calendar"></i></button> 
     </span> 
    </p> 
    </div> 
+0

이 나를 위해 일 –

답변

1

확인이 DEMO

<h1>Datepicker inside repeater demo</h1> 

<div class="container content-body"> 
<div class="row" ng-repeat="dt in dates"> 
    <div class="col-md-6"> 
     <p class="input-group"> 
      <input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt.date" is-open="dt.opened" datepicker-options="dateOptions" /> 
      <span class="input-group-btn"> 
      <button type="button" class="btn btn-default" ng-click="open($event,dt)"><i class="glyphicon glyphicon-calendar"></i></button> 
      </span> 
     </p> 
    </div> 
</div> 

+0

당신을 감사를 표하는 plunker을 만들 수 있습니다. –