title: jQuery UI Datepicker - onSelect get the selected date +3 days
body: <p>I try to create a date range by using the jQuery UI datepicker, using two text fields. The first text field "start_date" will set the start date and the second text field "end_date" will set the end date.</p>
  
  <p>The code I have till now is this:</p>
  
  <pre><code>$('#start_date').live(
      'focus',
      function()
      {
          $('#end_date').datepicker(
              {
                  dateFormat: 'dd MM yy',
                  minDate: new Date(),
                  maxDate: new Date(2012, 9, 15),
                  stepMonths: 2,
                  numberOfMonths: 2
              }
          );
  
          $(this).datepicker(
              {
                  dateFormat: 'dd MM yy',
                  minDate: new Date(),
                  maxDate: new Date(2012, 9, 15),
                  stepMonths: 2,
                  numberOfMonths: 2,
                  onSelect: function(dateText, inst)
                  {
                      var instance = $( this ).data("datepicker");
  
                      var date = $.datepicker.parseDate(instance.settings.dateFormat, dateText, instance.settings);
  
                      $('#end_date').datepicker('option', 'minDate', dateText);
                  }
              }
          );
      }
  );
  </code></pre>
  
  <p><strong>NOTE</strong> : I use the live and the focus event because all my page content is loaded with AJAX call. Maybe that is correct or wrong, but this is not what I like to ask here ;)</p>
  
  <p>The above code is correct for me and work fine, but what I like to do, is to <strong>set</strong> the value of the 'end_date' element to selected one +3 days.</p>
  
  <p>Until now, when I choose a date at the "start_date" element the "end_date" element change to the same date as the "start_date", and this is what I like to change. The "end_date" to be +3 days from the "start_date" element adter the selection.</p>
  
  <p>How can I do that ?</p>