[TYPO3-mvc] DateTiime Fields / configuring the new property manager
Dennis Ahrens
dennis.ahrens at googlemail.com
Thu Oct 27 17:45:48 CEST 2011
Hi Matthias,
i've digged a bit into your issue and stumpled about the
DateTimeConverter [1] included in the new PropertyMapper. The class
comment shows a way to change the expected format:
* The date string is expected to be formatted according to
DEFAULT_DATE_FORMAT
* But the default date format can be overridden in the
initialize*Action() method like this:
* $this->arguments['<argumentName>']
* ->getPropertyMappingConfiguration()
* ->forProperty('<propertyName>') // this line can be skipped in
order to specify the format for all properties
*
->setTypeConverterOption('Tx_Extbase_Property_TypeConverter_DateTimeConverter',
Tx_Extbase_Property_TypeConverter_DateTimeConverter::CONFIGURATION_DATE_FORMAT,
'<dateFormat>');
regards
Dennis
[1]
http://git.typo3.org/TYPO3v4/CoreProjects/MVC/extbase.git?a=blob;f=Classes/Property/TypeConverter/DateTimeConverter.php;h=d0cba49e19649331178de82a63c355557818254f;hb=HEAD#l24
More information about the TYPO3-project-typo3v4mvc
mailing list