Link to home
Start Free TrialLog in
Avatar of Maxim10553
Maxim10553Flag for United States of America

asked on

Formatting a text box for a Date

i have a text box on a form where i would like users to enter in a date. ie.  08/14/2001. I would like to have the "/" already in the text boxes so users would only have to enter in the numbers. Any suggestions?
ASKER CERTIFIED SOLUTION
Avatar of Otana
Otana

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wsh2
wsh2

masked edit control (as stated by Otana)

or

calendar control

or

Use three Textbox's

and/or

trap the Textbox's keydown event.. testing for only numeric entry.. along with a test for the length of the entered text.. so that you can then dynamically add the slashes where they belong.
Avatar of Maxim10553

ASKER

thanks guys. exactly what i was looking for
hey, one more thing. what about a price format. any suggestions on that? guessing the input mask has to be dynamic in nature. ie $10.10, $1000.10, $ 10000.10
Tip.. Dollar signs only make your data harder to read.. cluttering your presentation. If a field is dollar.. place the dollar symbol in a Label caption next to your text box.
thanks, threw some points up for you. will try what you said