I want to compare two dates to see if they are the same, while ignoring Time as well.
I've tried using the .setHours(0,0,0,0) method to set the time to something neutral, but then I can't use the .getTime() method due to this error..
Property 'getTime' does not exist on type 'number'
I've also researched that I shouldn't use ===, but I can't overcome the getTime problem first.
if (this.datelist.filter(x => new Date (x.sentDate).setHours(0,0,0,0).getTime() === this.searchQuery.getTime()).length == 0) {
console.log("No matches");
}