Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validation for Future date

 
Vipul Tulsulkar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic