How can I force the user to select dates that have passed when using the Date picker in the form API? I need to use a pop up date picker from the Date module in the Form API.  It's displaying OK, but I want to restrict the user to only have the option of selecting dates that have passed, and not future dates.

How can I achieve this?

Here is my code:

$form['fieldset_one']['date_field'] = array(
  '#weight' =&gt; '5',
  '#title' =&gt; t('Date of Birth'),
  '#type' =&gt; 'date_popup',
  '#date_format' =&gt; 'Y-m-d',
  '#date_year_range' =&gt; '-80:0',
);
They are talking about datepicker options here: Customize days that can be clicked on a Calendar popup

Apparently datepicker is quite versatile, with those options you can set max-date, min-date etc.