title: Using altFormat and altField in jquery UI datepicker range
body: <p>I am trying to get range of dates "from" and "to" to add it to my DB. I use altFormat and altField to capture the date in DB format (yy-mm-dd) while displaying normal date format in the UI using Datepicker jquery UI component.</p>
  
  <p>My question is: How do I use this in the Datepicker UI range. Where can I specify the altField for my from and to datepickers?</p>
  
  <p><a href="http://jqueryui.com/demos/datepicker/#date-range" rel="noreferrer">http://jqueryui.com/demos/datepicker/#date-range</a></p>
  
  <p>My Code:</p>
  
  <pre><code>var dates = $( "#hotel_display_checkin_date, #hotel_display_checkout_date" ).datepicker({
          defaultDate: "+1w",
          changeMonth: true,
          numberOfMonths: 1,
          altFormat: "yy-mm-dd",
          altField: "#hotel_checkin_date",
          onSelect: function( selectedDate ) {
              var option1 = this.id == "hotel_display_checkin_date" ? "minDate" : "maxDate",
  
                  instance = $( this ).data( "datepicker" ),
                  date = $.datepicker.parseDate(
                      instance.settings.dateFormat ||
                      $.datepicker._defaults.dateFormat,
                      selectedDate, instance.settings ),
                      options = {option1: date}
              dates.not( this ).datepicker( "option", options );
          }
          });
  </code></pre>
  
  <p>I tried adding the altField option to options = {option1: date}, but that does not work</p>