[TYPO3-mvc] Fluid form with DateTIme as user input

Hendrik Nadler nadler at simplethings.de
Fri Aug 23 12:11:01 CEST 2013


Hi,

im running mad about this: How is the "official" way to let the user enter/choose a datetime (e.g. "2013-08-23 12:24") in a fluid form? 

If i set a default in the constructor 

class Foo extends AbstractEntity
{
    /**
     * @var \DateTime
     * @validate NotEmpty
     */
    protected $barTime;

    public function __construct()
    {
        $this->barTime = new \DateTime();
    }
...

It is not possible for the user to change the dateTime with neither

<f:form.textfield id=" barTime " property=" barTime " value="{foo. barTime ->f:format.date()}" />

nor

<f:form.textfield id=" barTime " property=" barTime " />

Can´t find any exapmles for that:-/ Do i habe to create a dummy field and then set the user value in the controller?

Regards, Hendrik



More information about the TYPO3-project-typo3v4mvc mailing list