title: jQuery Date Picker - disable past dates
body: <p>I am trying to have a date Range select using the UI date picker.</p>
  
  <p>in the from/to field people should not be able to view or select dates previous to the present day.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$(function() {
      var dates = $( "#from, #to" ).datepicker({
          defaultDate: "+1w",
          changeMonth: true,
          numberOfMonths: 1,
          onSelect: function( selectedDate ) {
              var option = this.id == "from" ? "minDate" : "maxDate",
                  instance = $( this ).data( "datepicker" ),
                  date = $.datepicker.parseDate(
                      instance.settings.dateFormat ||
                      $.datepicker._defaults.dateFormat,
                      selectedDate, instance.settings );
              dates.not( this ).datepicker( "option", option, date );
          }
      });
  });
  </code></pre>
  
  <p>Can some one tell me how to disable dates previous the to the present date.</p>