Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date

 
visu Nekk
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,

How to compare two dates to check whether the entered date is not greater than the current date using javascript?
Thanx in advance,
Visu N
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basic idea:

[code]
var Date1 = new Date("1/13/2005");
var Date2 = new Date("1/13/2006")'
alert(Date2 > Date1);
[code]

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic