-- Chris MacPherson <[EMAIL PROTECTED]> wrote
(on Friday, 16 May 2008, 03:17 PM +0100):
> I'm trying to figure out the easiest way of creating a date input  
> structure to use in my Zend_Forms. Something that will allow the user to  
> select a day, month and year.
>
> I can see this becoming a monster if I have to do it using three  
> Zend_Form_Element_Select for every date input as I have multiple dates  
> that need entering in my form. This would mean a huge Zend_Form class  
> which I think may be a bit of overkill.
>
> Has anyone covered this ground before at all? Or have any ideas or  
> pointers that I can check out.

Zend_Validate_Date takes a standard input format (YYYY/MM/DD, iirc)...
but this isn't a good UI. :-)

A number of JS libraries allow you to decorate an element as a date
picker - I've seen such things in Dojo and YUI, for instance. This might
be a simple, viable option that would allow you to use a standard
Zend_Form_Element_Text element with the Date validator.

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to