title: AngularJS DatePicker not updating the value when a date is clicked
body: <p>I am using the datepicker directive of angularjs from angular materials to create a calendar for input of date.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;md-datepicker ng-model='vm.endtoDate'&gt;&lt;/md-datepicker&gt;
  </code></pre>
  
  <p>The problem i am facing is that when i click on any date on the calendar it does not gets updated.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code> function SearchController($scope,$stateParams, $q, $log, httpRequests, $location, searchResults, header, icons,leafletData){
        var coordinates_selected;
        var vm = this;
        vm.endtoDate = new Date();
        var endto= console.log(JSON.stringify(vm.endtoDate,'end'));
  </code></pre>
  
  <p>P.S i do not want to use the watch function to monitor the changed values as i later want to store the values in another variable for temporal searching.</p>