In date_parts_element()
there's the line
$hours_format = strpos(strtolower($element['#date_format']), 'a') ? 'g': 'G';
This is deciding on whether to be 24 hour on the presence of the AM/PM specifier. If you change the format to d-F-Y g:i a
it should work I think.
If you don't want to display the AM/PM specifier, but fix it at a particular value, you can do something like this
...
// Add a new process function to this date_select to hardcode am/pm.
$info = element_info('date_select');
$process = $info['#process'];
$process[]= 'MYMODULE_date_select_process_am_only';
$form['scheduled_for'] = array(
'#type' => 'date_select',
'#title' => t('Scheduled for'),
'#date_label_position' => 'within',
'#date_format' => 'd-F-Y g:i a',
'#date_increment' => 15,
'#date_year_range' => '-0:+3',
'#default_value' => time(),
'#process' => $process,
);
...
/**
* #process callback for a date_select element that removes the AM/PM specifier
* and hardcodes its value to AM.
*/
function MYMODULE_date_select_process_am_only($element) {
$element['ampm']['#type'] = 'value';
$element['ampm']['#value'] = 'am';
return $element;
}
It's untested but works in my head (: If you wanted to do the same thing on a number of different forms, there's a more elegant way (let me know if you're interested).