title: Disable selection jQuery Datepicker field?
body: <p>I'm using jQuery UI Datepicker to make a two field submission form. I want the user to create a range and submit it to see results. However, they obviously cannot pick a start date that happens more recently than an end date (you can't see a range starting today and going to yesterday).
   As of now, I've been able to put an alert on selection of the second one if the first one happened before it, but I can't figure out how to have the datepicker stay open so the user can select something else. </p>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
          $(".datepicker_start").datepicker({
              maxDate: '+0d',
              onSelect: function(dateText, inst) {
  
          }
          });
          $(".datepicker_to").datepicker({
              maxDate: '+0d',
              onSelect: function(dateText, inst) {
                   var startDate = $('.datepicker_start').val();
                  $(this).attr('value', dateText)
                  if (startDate &gt; dateText) {
                      alert('not cool!');
                  }
          }
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Does anyone know how I'd do this? I tried returning false but it still pushes the incorrect date to the field :(</p>