js check date is future 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
}