Closed (won't fix)
Project:
Date
Version:
6.x-2.0
Component:
Date API
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
4 Dec 2009 at 13:21 UTC
Updated:
13 Nov 2015 at 18:49 UTC
I have searched through these issues and not seen an answer.
I want to make a sensible (for my users) hour range dropdown in my form using date_select with the Date API. My users will never be entering 23:00 so why have the dropdown with that in the selections?
I see a year range, and a way to limit the minutes by date_increment, but no hour range.
How would I display just 08:00 to 20:00 (for example) in the drop downs? I don't want to us am/pm.
Code I am using
$format = "G:i";
$form['site_characteristics']['sampling_time'] = array(
'#type' => 'date_select',
'#date_format' => $format,
'#date_label_position' => 'within',
'#date_increment' => 15,
'#title' => t('Please enter the approximate time'),
);
Thanks
Comments
Comment #1
arlinsandbulte commentedHi,
I am just indiscriminately closing all support requests with no activity for more than 1 year.
If you consider this to still be a valid issue / support request, feel free to re-open.
BUT,
if you are re-opening this issue, please provide specific details on how this issue can move forward.
Thanks.