I am using this plugin and it has worked very well for me, but I need to be able to subtract 2 dates (start - end) to display the result in days in a span. How could I perform this operation? Does this plugin have a method to do this? This is the way I add the dates.
$("#fechainicio").datepicker();
$("#fechafin").datepicker();
To calculate the number of days between two dates I would do the following:
EXPLANATION:
We're basically getting the number of milliseconds in each date, subtracting the milliseconds, and finally converting to days.
I use this function to get the difference in days of 2 given dates.
Greetings.