I am using angular material date picker in my app.I need to change color of some speccific dates.For this I am using 'dateClass' property of mat-datepicker.But it's not working.
html
<mat-datepicker [dateClass]="dateClass" #picker1 ></mat-datepicker>
component
dateClass = (d: Date) => {
const date = d.getDate();
// Highlight the 1st and 20th day of each month.
return (date === 1 || date === 20) ? 'example-custom-date-class' : undefined;
}
error
Can't bind to 'dateClass' since it isn't a known property of 'mat-datepicker'.
1. If 'mat-datepicker' is an Angular component and it has 'dateClass' input, then verify that it is part of this module.
2. If 'mat-datepicker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
how can I solve this issue?