Default Value on startdate will fail on days from '02' to '09'. You need to change just one letter.

  $form['settings']['startdate'] = array(
    '#prefix' => '<div class="edit-settings-startdate">',
    '#suffix' => '</div>',
    '#type' => 'date',
    '#title' => t('Starting date'),
    '#description' => t('Date that the poll opens'),
-   '#default_value' => array('year' => date('Y', $date), 'month' => date('n', $date), 'day' => date('d', $date)),
+   '#default_value' => array('year' => date('Y', $date), 'month' => date('n', $date), 'day' => date('j', $date)),
  );

I see that the whole part is rewritten in 5.x-1.x-dev. Never mind then.

Comments

ChrisKennedy’s picture

Status: Needs review » Closed (won't fix)