title: JQueryUI Datepicker directive malfunction after removing element using Angular's List.Splice()
body: <p>The JQueryUI Datepicker malfunction when I remove an element using Angular list.splice($index,1) inside a ng-repeat statement.</p>
  
  <p>After removing (using the del($index) function shown bellow), the calendar is shown but it starts picking the date for the next input, and the next input for the next one...</p>
  
  <p><strong>Angular Controller:</strong></p>
  
  <pre><code>myApp.controller("CheckList", ["$scope", function ($scope) {
          $scope.items = [];
  
          ... // add/load function
  
          $scope.del = function (index) {
              $scope.items.splice(index, 1);
  
          };
  
  }]);
  </code></pre>
  
  <p><strong>Angular Datepicker Directive:</strong></p>
  
  <pre><code>myApp.directive('datepicker', function ($timeout) {
         var linker = function (scope, element, attrs) {
  
              $timeout(function () {
                  element.datepicker({
                      dateFormat: 'dd/mm/yy',
                      changeYear: true
  
                  });
              });
          }
  
          return {
              restrict: 'A',
              link: linker,
              transclude: true
          }
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>  &lt;div ng-controller="CheckList" id="divListItems" ng-cloak&gt;
         &lt;div ng-repeat="item in items" &gt;
              &lt;input type="text" datepicker id="CheckList-_{{$index}}_-ValidadeFinal"
                  name="CheckList[{{$index}}].ValidadeFinal" ng-model="item.valfinal" /&gt;
        &lt;/div&gt;
        &lt;button type="button" ng-click="del($index)"&gt;Del&lt;/button&gt;
   &lt;/div&gt;
  </code></pre>