[TYPO3-mvc] <f:format.date> shows "could not be parsed by DateTime constructor. " in the FE

"Christian Müller (Kitsunet)" christian at kitsunet.de
Sun Jul 11 09:42:19 CEST 2010


Did you specify your model property as DateTime object?

Christian

On 10.07.2010 23:11, Stephen Bungert wrote:
> I have the following template for my show action:
>
> <p>Theatre Cal Show Test</p>
> <h2 class="title">{items.title}</h2>
> <p class="date"><f:format.date>{items.datetime}</f:format.date></h2>
>
> In the FE I see the title ok, but where the date should go I see:
>
> "1278740610" could not be parsed by DateTime constructor.
>
> I tried googling but every example I find for <f:format.date>
>
> <f:format.date>{object.dateProperty}</f:format.date>
>
> What could be the cause of this?
>
> Here is my items tca array for the field datetime:
>
>
> 'datetime' => array(
> 'exclude' => 1,
> 'label' =>
> 'LLL:EXT:theatre_cal/Resources/Private/Language/locallang_db.xml:tx_theatrecal_domain_model_items.datetime',
>
> 'config' => array(
> 'type' => 'input',
> 'size' => 12,
> 'max' => 20,
> 'eval' => 'datetime, required',
> 'default' => time(),
> )
> ),



More information about the TYPO3-project-typo3v4mvc mailing list