I am trying set up a booking page where the user can pick a arrival date and and departure date and then have a function calculate the number of nights a person is staying. I am having a vary hard time doing this.
At the moment I am using moment js and pikaday to get the users input, but then can I just get the number of days they are staying and subtract one or is this logic flawed? and is there a simple way of finding the number of days?