I installed the Date Picker module, which works fine. This is what appears when I add the datepicker element to the form.
This is the code I use to add the datepicker element.
$form['date'] = array(
'#title' => t('Select your birthdate'),
'#type' => 'datepicker',
'#date_format' => 'd/m/Y',
'#date_year_range' => '-100:+0',
'#default_value' => date("Y-m-d H:i:s", time()),
);
I want to display a text field; when it has the focus, the calendar should be shown.
How should I change the code to make it possible?