Mimic webform date field in custom form
If you have date_popup enabled you can achieve the calendar part by using this:

$form['date_starting'] = array(
  '#type' =&gt; 'date_popup',
  '#title' =&gt; t('Starting'),
  '#date_format' =&gt; 'Y-m-d',
  '#date_year_range' =&gt; '-3:+3',
);


Then you can style the input field as a calendar button and use javascript to copy the date value to your date select.