I was browsing through the net to find a javascript function which can check whether the date entered by the user is current date or the future date but i didn\'t found a s
You can compare two dates as if they were Integers:
var now = new Date();
if (before < now) {
// selected date is in the past
}
Just both of them must be Date.
First search in google leads to this: Check if date is in the past Javascript
However, if you love programming, here's a tip:
Enjoy.