datepicker UI Arrival and Departure Fields

datepicker UI Arrival and Departure Fields

I have a WordPress form on my client's hotel website with an arrival field and a departure field.  The client wants the departure date to add +1 day to the minDate when a user selects the arrival date. I have tried adding +1 to several areas but nothing seems to work. I have attached the script I am using (it's using jQuery instead of $ because the form is in a code block in WordPress). I have searched several forums and Google searches with no success.

  1. <script>
  2.   jQuery(function() { var dateFormat = "M dd,yy", 
  3.       from = jQuery( ".check-in-date-view" ) 
  4.         .datepicker({ 
  5.         minDate: 0, 
  6.         maxDate: "+12m", 
  7.           defaultDate: "+1w",
  8.           dateFormat: "M dd,yy",
  9.           altFormat: "mm/dd/yy", 
  10.           altField: ".arrival-date",
  11.           changeMonth: true, 
  12.           changeYear: true, 
  13.           numberOfMonths: 1 
  14.         }) 
  15.         .on( "change", function() { 
  16.           to.datepicker( "option", "minDate", getDate( this ) ); 
  17.         }), 
  18.       to = jQuery( ".check-out-date-view" ).datepicker({ 
  19.         defaultDate: "+1w", 
  20.         minDate: 1, 
  21.         maxDate: "+12m", 
  22.           dateFormat: "M dd,yy",
  23.         changeMonth: true,
  24.           altFormat: "mm/dd/yy", 
  25.           altField: ".departure-date", 
  26.         changeYear: true, 
  27.         numberOfMonths: 1 
  28.       }) 
  29.       .on( "change", function() { 
  30.         from.datepicker( "option", "maxDate", getDate( this ) ); 
  31.       }); 
  32.  jQuery(".check-in-date-view").datepicker("setDate", new Date());     
  33.          jQuery(".check-out-date-view").datepicker("setDate", 1); 
  34.     function getDate( element ) { 
  35.       var date; 
  36.       try { 
  37.         date = jQuery.datepicker.parseDate( dateFormat, element.value ); 
  38.       } catch( error ) { 
  39.         date = null; 
  40.       } 
  41.       return date; 
  42.     } 
  43.   } ); 
  44. jQuery(".promo-trigger").click(function(){
  45.     jQuery(".flyout-wrapper").toggle();
  46. });
  47. </script>