title: Get the Date from Datepicker programmatically as Text
body: <p>I'm trying to get a date, which is displayed in an input of the bootstrap ui datepicker as pure text. Therefore I use a span.
  Now I want to get the text of the span, but it doesn't work. Actually, I get an <code>undefined</code>. Do you have some tips for me?</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;input type="text" class="form-control" datepicker-popup="{{format}}" ng-model="dt" is-open="opened" min-date="minDate" max-date="'2020-06-22'" datepicker-options="dateOptions" date-disabled="disabled(date, mode)" ng-required="true" close-text="Close" /&gt;                  
  &lt;span ng-model="textDate"&gt;{{dt | date:'dd.MM.yyyy' }}&lt;/span&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$scope.$watch('dt', function() {        
     var tD = $scope.textDate.value;
     console.log(tD);
  });
  </code></pre>