I am currently using Drupal 7 date_popup. One of the problems I ran into is the default value, which is not displayed if I selected the format only by time.
those.
$form['start'] = array( '#type' => 'date_popup', '#title' => t('Start'), '#default_value' => date("Ymd H:i:s", $start), '#date_format' => "Ymd h:i A", );
shows the correct default value, although it includes all date materials (in fact, I want to actually only have a timepicker). But if I changed '#date_format' to a time-only format, that is, to this:
$form['start'] = array( '#type' => 'date_popup', '#title' => t('Start'), '#default_value' => date("Ymd H:i:s", $start), '#date_format' => "h:i A", );
There is no default value. How can I get the default value for date_popup for time format?
source share