>It's amazing how the simplest things can seem daunting.
>
>I've created an HTML page that prompts for filter criteria. One of the criteria is date ranges. I need to be able to prompt the user for two dates.
>
>I honestly don't know how to define two date variables (dStart and dEnd) and prompt for them in a MM/DD/YYYY format. I've looked through several ASP and HMTL books, and can't figure it out. I feel royally stupid asking, but I don't know how to do it.
>
>Thanks in advance,
>Kevin
Hi Kevin,
Unfortunately you can't get an 'auto-validated' date entry on an HTML page. You will need to do one of the following:
1) Use a single text field. Use some text to prompt the user for date in mm/dd/yyyy format, then validate the results to ensure compliance. You could validate either in the client (with Javascript) or in the back-end .ASP page.
2) Similar to the above but use three seperate text fields, one for each part of the date(MM, DD and YYYY). You still need to validate the data as a whole before using it.
3) Some sites use three selection list (combo's), one for each part of the date (MM, DD and YYYY). This approach simplifies the validation slightly, as you will be sure that all data selected is numeric. You just have to validate that the date constructed is real (i.e. not 31st Feb.)