[TYPO3-project-4-3] ExtJS Date-picker for TCEFORMS
Martin Kutschker
masi-no at spam-typo3.org
Tue Jun 30 11:20:42 CEST 2009
Ernesto Baschny [cron IT] schrieb:
> Steffen Kamper wrote: on 29.06.2009 16:27:
>
>> found it (jsfunc.evalfield.js, line 442ff):
>>
>> if (this.USmode) {
>> theString =
>> (theTime.getUTCMonth()+1)+'-'+theTime.getUTCDate()+'-'+this.getYear(theTime);
>>
>> } else {
>> theString =
>> theTime.getUTCDate()+'-'+(theTime.getUTCMonth()+1)+'-'+this.getYear(theTime);
>>
>> }
>>
>> so 2 hardcoded formats :(
>
> I already replied to you privately, but to make it public: This is not
> so easily "configurable" because it is not meant only to display the
> date but also has to be way TYPO3 parses the user-input. So if you have
> some configuration for displaying, you'll have to use the same
> configuration for "parsing" the date/time information.
IMHO parsing should be done in a relaxed way.
So eg d.m.y, d-m-y and d/m/y should be accepted (with or without leading
zeros, year may be in 2 or 4 digits).
When the US format is enabled it will be of course m.d.y.
Ideally the parser would accept a "reversed" date if it makes sense. Eg
when I have US format and enter 28.4.2009 it will still accept it
assuming that I have swapped day and month.
What always should be accepted is this format: Y-m-d (also with / and .)
as a 4 digit year at the beginning is easily distinguished from other
formats.
What's missing is a $TYPO3_CONF_VARS['SYS']['dateSeparator'] setting for
the output. And maybe a way to put the time *after* the date in datetime
fields.
Masi
More information about the TYPO3-project-4-3
mailing list