I was browsing through the net to find a javascript function which can check whether the date entered by the user is current date or the future date but i didn\'t found a s
here's a version that only compares the date and excludes the time.
Typescript
const inFuture = (date: Date) => { return date.setHours(0,0,0,0) > new Date().setHours(0,0,0,0) };
ES6
const inFuture = (date) => { return date.setHours(0,0,0,0) > new Date().setHours(0,0,0,0) };