• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript Date Check

 
Sahil Sharma
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a textbox that contains date in this format DD-MON-YYYY.
Now i want to compare this with the current date to check that it should be less than the current date. How can i do so.
When i compare like this (dateentered is less than currentdate). Then results are not consistent. I think it is doing string comparison rather than date.

Thanks.
 
Eideo Guo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can use the Date object to compare,for instance:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic