Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes HTML, CSS and JavaScript and the fly likes Comparision of date using javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Comparision of date using javascript" Watch "Comparision of date using javascript" New topic

Comparision of date using javascript

Sapan Shah

Joined: Jan 01, 2010
Posts: 25
I want to compare two dates using javascript.
First date is present date and another date is that which i will enter in the text field in the format of dd-mm-yyyy.
There will be only one textfield in which i will enter the date and that value will be compare with present date.

Kindly guide me as i am new to javascript.
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
Basic idea:

salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

that solves half the problem.

here is a comparison code i found via google:
now the mystery lies in making this code work for you too

My Website: [] Cool your mind:[] My Sally:[]
It is sorta covered in the JavaRanch Style Guide.
subject: Comparision of date using javascript
Similar Threads
Problem with javascript dates
Comparison between two dates
Problem in Comparing Values; 7>14 returns true????
Regarding the date obtained using java.util.Date class