title: Add a day to departure javascript
body: <p>Please take a look at the following javascript code:</p>
  
  <pre><code>// Default calendar namespaces
      var dateFormat = "&lt;span class='day'&gt;d&lt;/span&gt; &lt;span class='month'&gt;M&lt;/span&gt; &lt;span class='year'&gt;yy&lt;/span&gt;",
          dateArrival = '#dateArrival input',
          dateDeparture = '#dateDeparture input',
          dateArrivalVal = '#dateArrival .date-value',
          dateDepartureVal = '#dateDeparture .date-value';
  
      // Show arrival calendar
      $(dateArrival).datepicker({
          minDate: 'D',
          dateFormat: dateFormat,
          // get value on selected date for departure
          onSelect: function (txt, inst) {
              $(dateDepartureVal).html(txt);
              $(dateArrivalVal).html($(dateArrival).val());
          },
          onClose: function (selectedDate) {
              $(dateDeparture).datepicker("option", "minDate", selectedDate);
          }
      });
  
      // Show departure calendar
      $(dateDeparture).datepicker({
          minDate: 'D+1',
          dateFormat: dateFormat,
          // get value on selected date for return
          onSelect: function (txt, inst) {
              $(dateDepartureVal).html(txt);
              $(dateDepartureVal).html($(dateDeparture).val());
          }
      });
  
      // set current date
      $('.datepicker').datepicker('setDate', 'today');
      // get current value from departure 
      $(dateArrivalVal).html($(dateArrival).val());
      // get current value from return
      $(dateDepartureVal).html($(dateDeparture).val());
  </code></pre>
  
  <p>As you can see, it is a booking widget that displays the current day as check in and the following day as check out. However, when the client chooses another day for check in, check out is set to THAT SAME day. What I want to do is, if dateArrival is chosen as, say, June 7th, dateDeparture automatically displays June 8th (that is, dateArrival + 1 day), instead of displaying the same date (June 7th). How can one do this?</p>
  
  <p>Thank you very much!</p>