By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,553 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

date validation

P: n/a
hi,
is there anyway that I can validate my date format in javascript?? the
format should be mmddyy, no space, no dash, and has to include 0 if
month is from 1-9, for example 01, 02, like that????
please help me out
thanks in advance
Wei
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
We*******@slps.org (weiwei) writes:
is there anyway that I can validate my date format in javascript?? the
format should be mmddyy, no space, no dash, and has to include 0 if
month is from 1-9, for example 01, 02, like that????


Your date format looks correct. Or did you mean to validate dates
against the date format?

Following a link from this group's FAQ:
<URL:http://jibbering.com/faq/>
I found this page:
<URL:http://www.merlyn.demon.co.uk/js-date4.htm#TDVal>

I would recommend using a four digit year, if nothing else.

If this is for use on the internet, where you can't assume the
nationality of the user, you should pick an international date
format, e.g., yyyy-mm-dd.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.