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..
angular-moment does the trick! ...and (very) else more.
Using the amDifference filter:
Get the difference between two dates in milliseconds. Parameters are date, units and usePrecision. Date defaults to current date. Example:
Difference: {{ dateFrom | amDifference : dateTo : 'days' }} days