• Hi,

    Is there any way to compute the value between two date fields? For instance, I have an arrival date and a departure date on my product, and want to automatically calculate the number of days that the person will be staying.

    I am very comfortable using hooks and filters in order to customise plugins, just need a point in the right direction.

    Thanks,

Viewing 1 replies (of 1 total)
  • Plugin Contributor sarkparanjothi

    (@sarkparanjothi)

    if you using date format dd/mm/yy
    NumberOfDays = parseInt( $( "#startDate" ).val() ) - parseInt( $( "#endDate" ).val() );

    example : parseInt("15/12/2016") - parseInt("10/12/2016");

Viewing 1 replies (of 1 total)
  • The topic ‘compute days between date fields’ is closed to new replies.