I have this code that I want to check if a date is in the past. I want to check it as soon as the date is entered, before form submission.
You can use
_isDate1LowerThanDate2(date1, date2) { return new Date(date1) < new Date(date2); }