Hi James,

Maybe my English is poor...
I know the FormHelper::datetime do that.
But in my case I need to specify a special DOM Id for each select to
add a "datepicker" and the FormHelper::datetime doesn't allow this
possibility.
So my question was about a Cake's method to deconstruct my date field
(YYYY-MM-DD) to pass the DD to my first select, MM to my second and
YYYY to my third. And in fact there is no other solution to make a
substr() !




On Apr 24, 2:07 am, James K <[EMAIL PROTECTED]> wrote:
> FormHelper's datetime input type already done exactly this. You don't
> have to manually put together the day/month/year fields.
>
> On Apr 23, 12:43 pm, avairet <[EMAIL PROTECTED]> wrote:
>
> > Hi everybody,
>
> > I'm searching for a day how format a date field from Mysql (YYYY-MM--
> > DD) to 3 form's selects:
>
> > - date from mysql : 2008-04-23
> > - my form fields are build like this:
> > for ($i=0;$i<11;$i++) {
> > $form->day('DixDate.'.$i.'.date',null,array('id'=>'date-sel'.$i.'-
> > dd')).'-'.
> > $form->month('DixDate.'.$i.'.date',null,array('id'=>'date-sel'.$i.'-
> > mm')).'-'.
> > $form->year('DixDate.'.$i.'.date','1900',$current_year,null)
>
> > }
>
> > I'm using "day", "month", "year" instead of "input()" because I'm
> > using a date picker that is need a special DOM id to work.
>
> > How can I pass the day value, the month value and year value for each
> > field?
> > Must I do a "substr()" on each of my date?
>
> > I hope my message is understandable...
>
> > Thanks for help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to