so basically I have an ionic mobile application which has a search button or filter feature. I already figure out how to filter the words but the problem here is that the date since it is a timestamp and is displayed in the app through angular date filter which is
<p>at {{item.fromDate | date:'mediumDate'}}</p>
Here's a picture for you to picture out.
Data that is displayed. As you can see the fromDate and toDate are Unix timestamp
so the problem here is that i wanted to do a search feature for dates but I'm having a hard time as to how since it is a timestamp.
here's is my code for the filter
getItems(ev: any) {
console.log("awdaw");
console.log("awdaw",this.ListOfitems);
console.log("otin");
this.ListofItems();
let val = ev.target.value;
if (val && val.trim() != '') {
this.ListOfitems = this.ListOfitems.filter((ListOfitem) => {
return (ListOfitem.fromAddress.toLowerCase().indexOf(val.toLowerCase()) > -1||
ListOfitem.toAddress.toLowerCase().indexOf(val.toLowerCase()) >-1) ;
})
}
}