Feature #29564

Change \TYPO3\FLOW3\Property\TypeConverter\DateTimeConverter in order to compose a DateTime property from two input fields

Added by Andreas Keßler about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Should have
Category:
Property
Target version:
-
Start date:
2011-09-08
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

It should be able to set one \DateTime property from two inputs

<input type="text" name="event[date][date]" value="{event.date -> f:format.date(format:'d.m.Y')}" />
<input type="text" name="event[date][time]" value="{event.date -> f:format.date(format:'H:i')}"/>
<f:form.hidden name="event[date][dateFormat]" value="d.m.Y H:i" />

The changes could be made in \TYPO3\FLOW3\Property\TypeConverter\DateTimeConverter:121 and could look like this

$time = "";

if(isset($source['time']) && is_string($source['time'])) {
    $time = " ".$source['time'];
}

$dateAsString = $source['date'].$time; // original line 121

Related issues

Is duplicate of TYPO3.Flow - Feature #27417: DateTime conversion supportResolvedBastian Waidelich2011-06-14

Actions

Also available in: Atom PDF