javascript check if date is in 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
}