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

Martin Kutschker masi-no at spam-typo3.org
Tue Jun 30 15:10:50 CEST 2009


Steffen Kamper schrieb:
> Hi Masi,
> 
> Martin Kutschker schrieb:
>>
>> 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.
>>
> 
> this can be very complex. I agree that any input form should be
> accepted, the display should change after lost focus to the configured one.
> To prevent writing an own parser i now try to use Ext.util therefore.
> When ExtJs is included anyway it's a big help.
> 
> But the problem with USmode will be:
> you enter 01/04/98
> could be 01.04.1998 or 04.01.1998, so how to differ?

Of course then the USmode swich defines how to interpret the date. I
just think it'd be nice if the parser accepts *obvious* mistakes by the
user.

> However the format
> is given it should be printed in the form like
> (dd/mm/yy) to help the editor for input.

I disagree. the date format should be printed in the preferred format of
the user. It's not necessary that all formats are possible, but I prefer
d.m.y for both input and ouptut and am not satisfied to write a date
with slashes.

I expect a date field to support common date formats.

> Having the date picker simplifies it anyway.

That's the point of having one :) Yet typing the date make sense and if
only to allow copy-n-paste.

Masi


More information about the TYPO3-project-4-3 mailing list