[FLOW3-general] datetime validator

Federico Bernardin typo3list at bernardin.it
Mon Jan 7 15:16:49 CET 2013


Great!
Thanks John.

Il giorno 07/gen/2013, alle ore 11:56, John Small <flow3.tiny69 at net-con.net> ha scritto:

> 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
> 
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general



More information about the FLOW3-general mailing list