- From: Dean Edwards <dean@edwards.name>
- Date: Fri, 09 Jul 2004 15:26:51 +0100
> Matthew Raymond wrote > >> Try searching on "javascript isdate". > Jim Ley wrote: > nope, still not found one, the one you seem to be talking about is the > constrained format version, remember I do not believe we can do > constrained format in legacy UA's, simply because we cannot provide > the hint on how to do it without confusing WF2 clients. Therefore we > have to be able to accept any random content. > i'm looking at an old date validation function of mine now. it handles international date formats and it's about 20 lines of code. the function was written to a client's specific requirements but it should not be too difficult to make sure that it is generic enough for WF2. if size is an issue (and i think it should be for a plugin such as this) then there are ways to compress javascript code. i just run my "isDate" function through my own javascript packer and it came out at about 600 bytes. as an aside, javascript is pretty good at validating dates. try this snippet: alert(Date.parse("3 Aug 1999")); cool huh? -dean
Received on Friday, 9 July 2004 07:26:51 UTC