How to set Form API date_select option values Creating a date_select field in a custom form, like this:

$date_format = "Y-m-d";
$form['birth_date'] = array(
    '#type' =&gt; 'date_select',
    '#title' =&gt; t('Date of birth'),
    '#default_value' =&gt; NULL,
    '#date_type' =&gt; DATE_FORMAT_UNIX,
    '#date_timezone' =&gt; date_default_timezone(),
    '#date_format' =&gt; $date_format,
    '#date_increment' =&gt; 1,
    '#date_year_range' =&gt; 'now:1910',
    '#date_label_position' =&gt; 'within',
    '#required' =&gt; TRUE,
);


The  element it generates for the year dropdown is like this

&lt;select&gt;
  &lt;option value="0"&gt;-Year&lt;/option&gt;
  &lt;option value="1"&gt;2017&lt;/option&gt;
  &lt;option value="2"&gt;2016&lt;/option&gt;
  &lt;option value="3"&gt;2015&lt;/option&gt;
   .
   .
   .
  &lt;option value="108"&gt;1910&lt;/option&gt;
&lt;/select&gt;


The year value returned in $form_state['values'] is the value of the option, e.g. if 2017 is chosen the value returned is 1. Is it possible to somehow set the option values like this instead

&lt;option value="2016"&gt;2016&lt;/option&gt; 


so that the actual year will be returned?
This is how I get when I copied your code without any change. Option values are correct, but somehow the order got reversed.

&lt;select class="date-year form-select" id="edit-birth-date-year" name="birth_date[year]"&gt;
    &lt;option value="" selected="selected"&gt;-Year&lt;/option&gt;
    &lt;option value="1910"&gt;1910&lt;/option&gt;
    &lt;option value="1911"&gt;1911&lt;/option&gt;
    &lt;option value="1912"&gt;1912&lt;/option&gt;
    .
    .
    .
    &lt;option value="2017"&gt;2017&lt;/option&gt;
&lt;/select&gt;


Check your Date / Date API module versions. I'm using 7.x-2.8