title: jQuery UI datepicker date range issue
body: <p>I made two date fields ("pickup" and "dropin"). And, I want to make sure that:</p>
  
  <ol>
  <li><p>Pickup date should be earlier than dropin date.</p></li>
  <li><p>When a user already choose his dropin and pickup dates and later he changes the pickup date later than dropin date, then the script  automatically changes his dropin date later than the user chose.
  (for example, a user put "12/07/2011" in pickup date and "13/07/2011" in dropin date then later he changes his pickup date to "13/08/2011". If so, the script should set "13/08/2011" as the dropin date.</p></li>
  </ol>
  
  <p>I referred to one of threads in this site. And, the following is the code I am having right now. </p>
  
  <pre><code>  $.datepicker.setDefaults({dateFormat: 'dd/mm/yy'});
    $("#pickup").datepicker({
              onSelect: function(dateText, inst){
                var minDate = $(this).datepicker('getDate');
                $('#dropin').datepicker('destroy').datepicker({
                          minDate: minDate
                      });
               },
              onClose: function(dateText, inst) {
                  if(dateText == '') {
                      $('#dropin').val('');
                  $('#dropin').datepicker('destroy').datepicker();
                  }
               }
              });
  
              $("#dropin").datepicker();
              var set=$("#dropin").datepicker('getDate');
              alert(set.getDate());
  </code></pre>
  
  <p>It looks like that it satisfies the first one. But, I have no idea about the second constraint. And, it keeps stating that 's' is null.</p>
  
  <p>Can you help me with the issue?
  Thank you very much.</p>