I have this asp page where i want the users to enter a date:
my problem is that the users can write "2004 July 01"
"Juli 01 2004" i want to limit that to only "2004-07-01"
so that they have to write it like that.
Or similar to both the above, you dould just force the user to select from three dropdowns. This givs you the simplicity of Chris's solution mixed with the even smaller need for validation from amorous's post without any extra objects. Or in English, you limit the user to only correct answers because they can't type anything in, but you don'thave to worry about them supporting anything client-side because you are using simple select tags.
in that case just use some java validation, force numbers only, and you can even capture on keypress for all items only, and alert an error if they try to type J for july.
plain english label out the entry format as in :
please enter your birthdate, format only as YYYY-MM-DD ( 1969-07-04 )
use a combination. select boxes for month and date, text box for the year. then you only need to check for numerics and the appropriate digit count (just one Reg Ex)
Chris.
Indifference will be the downfall of mankind, but who cares?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.