Possible Duplicate:
Compare 2 dates with JavaScript
I would like to have a Javascript function to compare 2 dates, the functionality should be as follows
If i given a date as 1-1-2011 and another as 31-12-2011 or 1-1-2011 it should prompt me a message such that date should be greater than the previous one.
Can any one help me
I will give you sample try as per your need