Quickform Date element time range.
| From: | Gary Smith | Date: | Tue, 24 Jan 2006 23:09:42 +0000 |
| Subject: | Quickform Date element time range. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229191@lists.php.net to get a copy of this message | ||
Aloha All,
I was wondering how I could set a time range using the date element. What I
need is a way to limit the time fields to reflect the times available. So if
the range is 7 am to 4 pm I would like the hours menu to only contain
7,8,9,10,11,12,1,2,3,4. Any time selected before 12 would be am and after 12
would be pm, it would be great if the am and pm could be set via javascript..
Here's my time element:
$contact->addElement ( 'date' , 'Times1' , 'Tee Time First Choice'
,
array('format' => 'g i A','optionIncrement' =>
array('i' => 10)));
Any suggestions?
Thanks,
Gary