Does anyone have experience with adding labels to specific dates in the angular material calendar? I am trying to achieve this feature, and while highlighting certain dates with a background color is not what I need, I have included an image below for reference.
If you have any insights or solutions on how to show labels on particular dates, please take a look at the following code snippet:
ex.html:->
<mat-calendar opened [selected]="date" [dateClass]="dateClass()">
</mat-calendar>
</mat-card>
ex.ts:->
dateClass() {
return (date: Date): MatCalendarCellCssClasses => {
if (date.getDate() === 21 || date.getDate() === 23) {
return 'special-date';
}
else{
return ;
}
};
}
Any help or guidance would be greatly appreciated. Thank you!