title: How to get response from Promise function .then?
body: <p>I have 2 input element as follows in my HTML:</p>
  
  <pre><code>&lt;input type="date" ng-model="calendarStart" class="form-control" style="display: inline-block; width: 180px !important;" /&gt;
  &lt;input type="date" ng-model="calendarEnd" class="form-control" style="display: inline-block; width: 180px !important;" /&gt;
  </code></pre>
  
  <p>and have .js : </p>
  
  <pre><code>$scope.calendarStart = new Date();
  $scope.calendarEnd = new Date();
  $scope.calendarEnd.setDate($scope.calendarEnd.getDate() + 7);
  
  var firstEndDate = new Date();
  var firstStartDate = new Date();
  
  var startData = "calendarStart";
  var endData = "calendarEnd";
  
  $scope.changeCalendarStart = function () {           
     dataService.settings_get(startData).then(function(response) {
        firstStartDate = response;
           if (firstStartDate != null) 
              $scope.calendarStart = firstStartDate;
  
        return firstStartDate;
     });
     return firstStartDate;
  };
  </code></pre>
  
  <p>How I can get response value from .then function , caz need to change value in inputs ?</p>