5
Thanks for the input, but it's a little different of a problem though. Try submitting something with a form that has a specified start time or time listing, such as a News or something with ExtCal. Look where it says start time and end time. Open up the picklist and you will see it has 0 - 23 with intervals of 10 on each adding up the time.
So it displays: 0:10, 0:20, 0:30 ..... 18:40, 18:50, 19:00.
It would be much nicer to have these listed in 12 hour am pm format. Any idea?
EDIT: Here's the ORIGINAL code found in "formdatetime.php" inside of 'class'-->'xoopsform' that is responsible for creating this 24 hour mode listing. IMO this is where the change needs to take place, but what needs to be changed?
le="color: #000000"><?php class XoopsFormDateTime extends XoopsFormElementTray { function XoopsFormDateTime($caption, $name, $size = 15, $value=0) { $this->XoopsFormElementTray($caption, ' '); $value = intval($value); $value = ($value > 0) ? $value : time(); $datetime = getDate($value); $this->addElement(new XoopsFormTextDateSelect('', $name.'[date]', $size, $value)); $timearray = array(); for ($i = 0; $i < 24; $i++) { for ($j = 0; $j < 60; $j = $j + 10) { $key = ($i * 3600) + ($j * 60); $timearray[$key] = ($j != 0) ? $i.':'.$j : $i.':0'.$j; } } ksort($timearray); $timeselect = new XoopsFormSelect('', $name.'[time]', $datetime['hours'] * 3600 + 600 * ceil($datetime['minutes'] / 10)); $timeselect->addOptionArray($timearray); $this->addElement($timeselect); } }
How can I make this list 12 hour with am and pm?