hi all.

i'm dealing with dates.
in my form i would like to edit a DATE database field with the chance
to save a null (or empty) value and, of course, the current option, if
present, selected.

this code does not display a label and i'm not able to pre-select the
current database value:
echo $form->datetime(
        'validity_date_from',
        'DMY', '24',
        $this->data['Dpage']['validity_date_from'],
        array(),
        true
);

with this code instead:
echo $form->input('validity_date_from', array(
        'type'=>'datetime',
        'label' => 'validity date from',
        'selected' => $this->data['Dpage']['validity_date_from'],
        'showEmpty' => true
));
i'm not able to show an empty value and the pre-selected option is not
the one stored in the database but the present date-time.

is it possible to join all my needs?

thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to