Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic HMTL question about prompting for dates
Message
From
22/06/2001 07:17:37
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00522197
Message ID:
00522317
Views:
8
>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.)
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform