File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 JavaScript Promises Essentials this week in the JavaScript 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:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Javascript Date Check