Skip to content

Instantly share code, notes, and snippets.

@deepakaryan1988
Created November 18, 2015 15:49
Show Gist options
  • Select an option

  • Save deepakaryan1988/eb176c425db0d101794b to your computer and use it in GitHub Desktop.

Select an option

Save deepakaryan1988/eb176c425db0d101794b to your computer and use it in GitHub Desktop.
Creating date field in custom form
http://drupal.stackexchange.com/questions/127729/form-api-fomatting-the-date-select-lists
$form['scheduled_for'] = array(
'#type' => 'date_select',
'#title' => t('Scheduled for'),
'#date_label_position' => 'within',
'#date_format' => 'd-F-Y',
'#date_increment' => 15,
'#date_year_range' => '-0:+1',
'#default_value' => time(),
//'#process' => $process,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment