I have set of dates and I want to enable only those dates in
.
\"ListOfDates\": [
{
\"startDate\": \"2018-01-01
myFilter = (d: Date): boolean => {
let enableFlag = false;
this.ListOfDates.some((date) => {
if (date.startDate === d) { // You can use any other comparison operator used by date object
enableFlag = true;
return true;
}
})
return enableFlag;
}
Note: You will have to format the d and dates in ListOfDates to a standard format of your choice