Double digit values for date I can not figure this out for the life of me, I am trying to have doubt digit values for  the day and month in my module using form api, I have tried this with the date api and still no luck,

my function looks like this

function set_dob_year_range($form_element) {
$form_element['year']['#options'] = drupal_map_assoc(range(1900, 2012));
return $form_element;
}

    $form['dob'] = array(
        '#type'  =&gt; 'date',
        '#title' =&gt; t('Date Of Birth'),
        '#default_value' =&gt; array(
            'month' =&gt; format_date(time(), 'custom', 'm'), 
            'day' =&gt; format_date(time(), 'custom', 'd'), 
            'year' =&gt; format_date(time(), 'custom', 'Y'),
        ),
        '#after_build' =&gt; array('set_dob_year_range'),
        '#required' =&gt; TRUE
    );


using in on the month should count the months values as 01 02 03 but instead its using 1 2 3, thing for the days it should be 01 02 03 instead its using 1 2 3.

Any help is greatly appreciated.

EDIT: The date formats are not passing through to the values for anyone that is confused.
You should try, i think it will work

format_date(time(), 'custom', 'm');
format_date(time(), 'custom', 'd');