Need Javascript for mm/dd/yyyy format

  • Thread starter Thread starter iHavAQuestion
  • Start date Start date
I

iHavAQuestion

I need to dispaly 'mm/dd/yyyy' on a text box(aspx page) by default.
When the user enters the date(only numerics) in the text box it should take
the date in that order.
eg.. if the user enters 01012008 on that text box, it should display
01/01/2008, adding '/' by itself.
if the user enters 12312008 on that text box, it should display
12/31/2008, adding '/' by itself.
I am having tuff time,Can anyone, please provide the code for this solution.
 
Something like:
http://www.dotnetspider.com/kb/Article3037.aspx

If you are doing AJAX, there is a masked edit control:
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/MaskedEdit/MaskedEdit.aspx

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top