js function to check date and find whether it is future or not code example
Example: js check if date is future
var now = new Date();
if (before < now) {
// selected date is in the past
}
var now = new Date();
if (before < now) {
// selected date is in the past
}