Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a "Mask" to TEXT INPUT field 1

Status
Not open for further replies.

jaredc

Programmer
Jun 28, 2002
43
GB
Hi

I have a TEXT INPUT field on a HTML FORM. Ideally I would like to provide a "mask" field for users to enter a date in mm/yy format, i.e. the user would see "_ _ / _ _" rather than a blank text field. I think I have seen this being done elsewhere on the web, but I have been unable to find/work out how to do this for myself.

Any help or thoughts would be very much appreciated.
 
Hi MikePasty,

I think this will solve your problem:


e.g. In the first field you can,

just type: 01 (and see what happens)
then type: 12 (and see what happens)
and last type: 59 and click the Tab-key (and see what
happens)

Do also try a wrong date like: 22/22/1967 + Tab-key

Hope this helps,
Erik
<!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Thanks very much for that Erik, I actually just wanted to display the format as mm/yy so I'll have to have a go at amending the source code a bit...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top