How can I get the date_popup module to display AM/PM in the time selector? In date_popup's README.txt, it states that


  The time selector will add AM/PM if 'a' is in the format string.


Which leads me to believe that 

'#default_value' =&gt; date("m/d/Y H:ia"),
'#date_format' =&gt; 'm/d/Y H:ia',


should result in a textfield for the time picker that looks like:


  [2:25pm]


but instead I just get a blank text field. I can't get any combination of default_value / date_format to result in what I'm looking for. Am I reading the documentation wrong, or can this be achieved?

Update: I couldn't get this darn thing working and decided to disable the timepicker (admin/config/date/date_popup) and added the timepicker from http://jonthornton.github.com/jquery-timepicker/ using the following code:

  $form['#attached']['css'][] = 'path/to/jquery-timepicker/jquery.timepicker.css';
  $form['#attached']['js'][] = '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js';
  $form['#attached']['js'][] = array('data' =&gt; "var jq9 = jQuery.noConflict();", 'type' =&gt; 'inline');
  $form['#attached']['js'][] = 'path/to/jquery-timepicker/jquery.timepicker.js';
  $form['#attached']['js'][] = array(
    'data' =&gt; "
      jq9(document).ready(function() {
        jq9('#edit-start-date--popup-1').timepicker();
      });",
    'type' =&gt; 'inline',
  );
  $form['start_date'] = array(
    '#title' =&gt; 'Start Date',
    '#type' =&gt; 'date_popup',
    '#required' =&gt; TRUE,
    '#date_type' =&gt; DATE_DATETIME,
    '#date_timezone' =&gt; date_default_timezone(),
    '#default_value' =&gt; date("m/d/Y h:ia"),
    '#date_format' =&gt; 'm/d/Y h:ia',
    '#date_increment' =&gt; 1,
    '#date_year_range' =&gt; '-1:+1',
  );
I remember having a similar issue - I fixed it using a custom module like this, the possible cause was probably that Drupal and jQuery returned different formats...

$GLOBALS['locale'] = $locale = 'fr';

/* [...] */

function x_form_alter(&amp;$form, &amp;$form_state, $form_id){
    // Fix date format in some exposed date filters (cck date)
    $date_format = 'd/m/Y'; /* Should be same as in "sites/all/js/jquery.datepicker/$locale.js" */
    foreach($form as $key =&gt; $value){
        isset($value['value']['#date_format']) &amp;&amp; $form[$key]['value']['#date_format'] = $date_format;
        isset($value['min']['#date_format']) &amp;&amp; $form[$key]['min']['#date_format'] = $date_format;
        isset($value['max']['#date_format']) &amp;&amp; $form[$key]['max']['#date_format'] = $date_format;
    }
}


I guess you can adapt this code to your situation and even better, suggest a cleaner solution.