aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Javascript Date Check Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript Date Check" Watch "Javascript Date Check" New topic
Author

Javascript Date Check

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
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

Joined: Aug 16, 2005
Posts: 29
you can use the Date object to compare,for instance:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript Date Check
 
Similar Threads
Date
*48hrs Rule (Solution method)*
How to compare two dates
Date comparision problem
date validation in java