What is the standard way to get/set datetimes to/from fluid in typo3 flow?
Is there editable html field which - like a basic f:form.textfield - will allow the datetime to be entered, edited and persisted?
I know I can display a datetime with eg
<f:format.date format="d.m.Y - H:i:s">{productArticle.classdate}</f:format.date>
but in that case the value is null nothing gets displayed and no entry is possible anyway. Does property work with f:format.date in some version? I get "property not registered" when I try it.
Or do I need to have two fields on my page, one for date and one for time, that I put together in the Action?
Thanks
I'm not sure if it's standard way, and personally I don't like it.. but it can be done like this:
In Fluid for new/edit actions:
In your controller you can add initialize*Action and update propertyMappingConfiguration for \DateTime if standard isn't good for you (it has to be done for both create and update action):
Sometimes it's easier to not pass object directly to controller but create it on service layer. You can also take a look at TypeConverters - they do not require initializeActions and you can easily override existing ones setting higher priority..