I'm building a custom form in Drupal 7 and i need to use the date_popup widget in it. It all works as expected, except the title of the field.
My code is:
$form['filter']['start_date'] = array(
'#type' => 'date_popup',
'#date_format' => 'd-m-Y',
'#title' => t('Start date'),
);
$form['filter']['end_date'] = array(
'#type' => 'date_popup',
'#date_format' => 'd-m-Y',
'#title' => t('End date'),
);
But it keeps showing the default label "Date" for the field, as you can see on in the picture below.
Can you please let me know how can i put Start date and End date as field labels instead of just Date, or correct me if i'm doing something wrong