title: Calculating days difference with using angular and jQuery datepicker
body: <p>In angular, I am trying to calculate the number of days between two selected date with using jQuery datepicker. It returns only null with the function that I am using..</p>
  
  <p>However I am not quite sure if it is the function or using datepicker in angular..It looks like the problem is function but it works when I use it with jQuery..</p>
  
  <p>my function:</p>
  
  <pre><code>$scope.dayDiff = function(firstDate,secondDate){
  
      $scope.dayDifference = parseInt(Math.round((secondDate - firstDate) / (1000 * 60 * 60 * 24)));;
  }
  </code></pre>
  
  <p>the rest: <a href="http://jsfiddle.net/1mzgLywe/5/" rel="nofollow">http://jsfiddle.net/1mzgLywe/5/</a></p>
  
  <p>Thanks in advance!</p>