[TYPO3-project-4-3] ExtJS Date-picker for TCEFORMS

Ernesto Baschny [cron IT] ernst at cron-it.de
Tue Jun 30 16:14:23 CEST 2009


Hi,

+1 Masi on your vision! :)

- Relaxed parsing (allowing copy&paste from other apps!)
- respecting "US-format" setting
- some minor configuration for output formating (date separator, time
before or after date and that is all)

With recognizing Y-m-d, you mean 4-digit-year, right? Because if now
there is no way to know what 08-04-03 means (3-april-2008 or 8-april-2003).

Cheers,
Ernesto

Martin Kutschker wrote: on 30.06.2009 11:20:
> 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