PDA

View Full Version : [SOLVED] Setting up DateField for Dates like 1.1.2008 or 1/1/2008



Uwem
12 Feb 2008, 6:25 AM
I was trying to set up Dateformat to accept German Date inputs.
This worked fine for formats like 01.01.2008 and 01.01.08.

Is there a way to allow dates like 1.1.2008 or 1.1.08 (no leading zeros)?

My System:
IE7,
ExtJs 2.0.1

Code :

{
format : "d.m.Y",
altFormats : "d.m.Y|d.m.y|d.m|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|d|Y-m-d"
}

Regards,
Uwe

fay
12 Feb 2008, 10:15 AM
Have you checked the Date Class documentation (http://extjs.com/deploy/dev/docs/output/Date.html)? Would it not be:


format: "j.n.Y",

Uwem
13 Feb 2008, 8:30 AM
Thank you!,
I obviously searched somewhere else...