[FLOW3-general] datetime validator

John Small flow3.tiny69 at net-con.net
Mon Jan 7 11:56:26 CET 2013


Hi,

forgot to mention in the method you have to tinker on 'newEvent', 
'begin' and of course the DateFormat to fit your needs :)


Am 07.01.2013 11:46, schrieb John Small:
> Hi,
>
> for output in your template use this:
>
> {somedate -> f:format.date(format:'d.m.Y H:i')}
>
> in your controller goes this:
>
> public function initializeCreateAction() {
>
>     $this->addFlashMessage('here: initializeCreateAction');
>     // set Format for property begin
>     $this->arguments['newEvent']
>         ->getPropertyMappingConfiguration()
>         ->forProperty('begin')
> ->setTypeConverterOption('TYPO3\FLOW3\Property\TypeConverter\DateTimeConverter', 
>
> \TYPO3\FLOW3\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 
>
>               '!d.m.Y H:i');
> }
>
>
> same for an update method
>
>


-- 
kind regards



More information about the FLOW3-general mailing list