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

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Nov 15 15:16:03 CET 2006


Ernesto Baschny [cron IT] schrieb:
> Martin Kutschker schrieb:
> 
>>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 description and the solution to the bug is clearly ok, as I was able
> to reproduce it. You can try with tt_news. Just set the archiveDate
> field to "readOnly => 1" in tca.php and then edit a tt_news record that
> has not archiveDate set. The date displayed will be 1-1-1970 without the
> patch and nothing with the patch.
> 
> Also consider my modification to cover also the other "date" related
> fields, which also have the same problem.
> 
> 
>>The code you have changed is only executed for fields of type
>>"none" with the "format" option set.
> 
> 
> I could not understand what you mean, or maybe you are wrong. The
> changed code is executed on fields with eval set to 'date' in the
> readOnly case (where you don't render an input box, but the text "as is").

When I look up the lines in the code I find they are part of formatValue() 
which is used only by the code the renders fields of type "none". You may 
set the readOnly flag for a type "none" but it does not matter.

Masi



More information about the TYPO3-team-core mailing list