title: jQuery Datepicker - Programatically Limit Second Datepicker
body: <p>I've recently been using the following piece of code to limit my 2nd Date picker (end date) so that it does not precede the date of the 1st Date picker.</p>
  
  <pre><code>$("#datepicker").datepicker({
   minDate: +5, 
   maxDate: '+1M +10D',  
   onSelect: function(dateText, inst){
             var the_date = dateText;
             $("#datepicker2").datepicker('option', 'minDate', the_date);
  
   }
   });
   $("#datepicker2").datepicker({
  
      maxDate: '+1M +10D', 
      onSelect: function(dateText, inst){
  
      }                       
  });
  </code></pre>
  
  <p>However, lately, I wanted to format my datepickers using:</p>
  
  <pre><code>dateFormat: 'yy-mm-dd'
  </code></pre>
  
  <p>But now, the 2nd datepicker actually allows the user to pick a date 1 day before.  </p>
  
  <p>For example, if the user picks the 1st date: 2010-04-03, when the 2nd Datepicker pops up, they are able to pick 2010-04-02 (1 day before their first selected date).</p>
  
  <p>I do not want the user to be able to pick a date that was before their first selected day.  </p>
  
  <p>Any ideas why this isn't working after I added in the "dateFormat"?</p>