|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Validating Dates
hi all,
i have a simple form in which i want the user to put date only in the format of (19-jul-03), if the user puts somethin else an error msg shud come. can u help me with this, i'll be more than thankful to you guys regards Sumeet
__________________
the coolest one |
|
#2
|
|||
|
|||
|
Don't know about a validation for that case, but perhaps you can do something with this script:
http://www.smartwebby.com/DHTML/date_validation2.asp |
|
#3
|
||||
|
||||
|
There's a few methods you can use to solve this.
One is "regular expressions". Quite tricky to begin with, but extrememly powerful. Basically you setup patterns, and check them against the user's input. The other method I can think of, which is quite simple, is to change your form. Use SELECT drop-downs so that the user cannot enter any bad data. You will then have full control over all formatting of the dates. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Validating Dates |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|