Notice: Array to string conversion in /var/www/public/Data/Temporary/Development/Cache/Code/Flow_Object_Classes/TYPO3Fluid_Fluid_Core_ViewHelper_TagBuilder.php line 199
thank you very much for your help. The solution with the “initializeCreateAction” works for me - it’s just some very much code to make a DateTime out of a string. Passing the property creationDate manually to the createAction and convert it into a DateTime seems to be faster.
Nevertheless I found your link very interesting, because I learned that browsers pass different Date strings - which makes it even more uncomfortable.
The idea of the propertymapper configuration, is to tell Flow, what format the data is passed as (Y-m-d for ex.) so it can convert it to the data object you expect in your actual createAction In that way, you always gets a DateTime object in your action, so you don’t have to convert it inside the action
I hope you get on with your project - if you get any new questions, create a new thread and let’s solve it
Little addendum: You can achieve the same without the initialize*Action and PropertyMappingConfiguration, by including the format in the form data like so:
Yes, the property “startDate” does not have the subproperties “date” and “dateFormat”, but that is not important. The ViewHelper just uses this as a path to a form field name without checking the property as long as the “value” attribute is also given. As the form data will be submitted as an array of values and the DateTimeConverter can convert an array with values date and dateFormat into a DateTime object. With this, you can even make the date format dynamic in the browser, by changing the value of the dateFormat field.