Need Javascript for mm/dd/yyyy format

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.
 
C

Cowboy \(Gregory A. Beamer\)

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!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top