Using the following code:
$date_format = 'Y-m-d h:i A';
$today = date($date_format);
if (isset($blogentity->live_on_date)) {
$the_date = date($date_format, $blogentity->live_on_date);
}
else {
$the_date = $today;
}
$form['live_on_date'] = array(
'#type' => 'date_popup',
'#title' => t('Date this blog goes live'),
'#default_value' => $the_date,
'#date_format' => $date_format, // Uses the PHP date() format - http://php.net/manual/en/function.date.php
'#date_increment' => 5,
'#date_year_range' => '-3:+3', // Limits the year range to the next two upcoming years
'#required' => FALSE,
'#weight' => 130,
does not work for me. Neither the date nor time display in their popup fields. Same thing for:
$date_format = 'Y-m-d h:iA';
$date_format = 'Y-m-d h:ia';
$date_format = 'Y-m-d h:i a';
$date_format = 'Y-m-d h:i A';
However, military time works just fine:
$date_format = 'Y-m-d H:i';
Closed: outdated
2.6
User interface
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.