[TYPO3-core] RFC: Bug #4515: Date fields displayed wrong in TCEforms

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Nov 15 10:17:47 CET 2006


Ernesto Baschny [cron IT] schrieb:
> Michael Stucki schrieb:
> 
>>This is a SVN patch request.
>>
>>Problem:
>>Input fields with TCA setting "eval" => "date" and "readOnly" => 1 will 
>>display a wrong date if they are empty.

I only noticed now that the bug description is wrong. ... or the solution. 
The code you have changed is only executed for fields of type "none" with 
the "format" option set.

>>Solution:
>>If the input value is undefined (zero), display an empty string.
>>
>>Branches: TYPO3_4-0 & Trunk
> 
> 
> +1 from me too, but with some modifications:
> 
> I just don't agree with that part:
> -                                               $value =
> date($option,$itemValue);
> +                                               $value =
> date('d-m-Y',$itemValue);
> 
> Why are you not using $option anymore? I don't know where this
> $config['format.']['option'] comes from, is it documented somewhere? Can
> this be set through TCA? How?

See above. As for the docs: I failed to deliver them.

See also the thread 'formatting options of TCA type "none"' (started at 
17.10.06).

Masi



More information about the TYPO3-team-core mailing list