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

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Nov 15 15:50:01 CET 2006


Martin Kutschker schrieb:

>> 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.

Maybe if you set the readOnly flag the fields in the TCEforms will
render as type "none", as you won't need an input field (or selectbox or
whatever) anymore. You just want to display the value "as is". So you
might be right, but I can assure you that this affects any field that
has eval=date and is set to readOnly, even with type = "input".

Anyway, you already gave a +1 to that, so I guess we agree that this
fixes the problem. :)

Cheers,
Ernesto



More information about the TYPO3-team-core mailing list