Created
January 24, 2016 17:21
-
-
Save derhansen/d60ff75c1e167dc2a6a0 to your computer and use it in GitHub Desktop.
Example on how to set the date format of a TYPO3 DatetimeConverter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function initializeCreateAction() | |
| { | |
| $this->arguments->getArgument('mymodel') | |
| ->getPropertyMappingConfiguration() | |
| ->forProperty('mydate') | |
| ->setTypeConverterOption( | |
| 'TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter', | |
| DateTimeConverter::CONFIGURATION_DATE_FORMAT, | |
| 'd.m.Y' | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment