title: jQuery Date Picker - Check-in and Check-out dates
body: <p>I have a form that allows a user to select a check-in and check-out date. The current behavior is if a user selects 01 March 2015 and the check-in date, the check-out date too automatically changes to 01 March 2015.</p>
  
  <p>I have live validation to ensure that the check-in and check-out dates are not the same as we have a minimum stay period.  This behavior means that the user sees an error as soon as he interacts with the form.</p>
  
  <p>The behavior I am trying to achieve is: if the user selects 01 March 2015 as the check-in date, the check-out date automatically changes to 08 March 2015 (7 days which is the minimum stay requirement.)</p>
  
  <p>The code I am working with this as follows:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          jQuery(document).ready(function(){
              var dates = jQuery( "$jquery" ).datepicker({
                  dateFormat: '$dateformat',
                  minDate: 0,
                  beforeShowDay: function(date){
                      if($search == 2 &amp;&amp; window.easydisabledays ){
                              return easydisabledays(date, jQuery(this).parents("form:first").find( "[name=easyroom],#room" ).val());
                      } else {
                          return [true];
                      }
                  },
                  $translations
                  firstDay: 1,
                  onSelect: function( selectedDate ){
                      if(this.id == '$instances[0]'){
                          var option = this.id == "$instances[0]" ? "minDate" : "maxDate",
                          instance = jQuery( this ).data( "datepicker" ),
                          date = jQuery.datepicker.parseDate( instance.settings.dateFormat || jQuery.datepicker._defaults.dateFormat, selectedDate, instance.settings );
                          dates.not( this ).datepicker( "option", option, date );
                      }
                      if(window.easyreservations_send_validate) easyreservations_send_validate(false, 'easyFrontendFormular');
                      if(window.easyreservations_send_price) easyreservations_send_price('easyFrontendFormular');
                  }
              });
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>I am specifically looking at this part of the code and have tried various options to no avail:</p>
  
  <pre><code>dates.not( this ).datepicker( "option", option, date );
  </code></pre>
  
  <p>Using date+86400*7 throws the check-out date forward about 1650 years. No other variations I have tried seem to work.  It's possible that I am looking at the wrong bit in the code or need to add something to the code to make it function correctly and was hoping someone could help or point me in the right direction.</p>
  
  <p>Thank you.</p>