This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Validation for Future date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Validation for Future date" Watch "Validation for Future date" New topic
Author

Validation for Future date

Vipul Tulsulkar
Ranch Hand

Joined: Dec 06, 2006
Posts: 41
Hi,

I am looking for a code in javascript that ensures future date validation.
e.g.If the date is 012508(format-MMDDYY) and if in the text field I try to give future date for example(012708),then it shuld give me an errori.e.
FUTURE DATE IS NOT ALLOWED.
I will be grateful if anybody could answer my question.


Regards,
Vipul
SCJP 1.4
SCWCD 1.4
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Usually I say....what have you tried?

But since I already had something very close to it, I modified the function to add your one check for future date which did not exist in mine.



Eric
Vipul Tulsulkar
Ranch Hand

Joined: Dec 06, 2006
Posts: 41
Thank you!!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Validation for Future date
 
Similar Threads
Clear validation message dynamically for the Datepicker
future date validation
why SCJP 5??
Client side validation using common validators
Very Urgent : Fututre Date validation using struts validation