see if date is after today js code example
Example 1: javascript date between two dates
// `min`, `max` and `date` are `Date` instances
const isBetween = (date, min, max) => (date.getTime() >= min.getTime() && date.getTime() <= max.getTime());
Example 2: js check if date is future
var now = new Date();
if (before < now) {
// selected date is in the past
}