Issue
How can i update dateClass manually in a function? datepicker
HTML
<mat-datepicker
[dateClass]="dateClass"
#picker
fxLayoutAlign="start start"
(opened)="appendFooter()"
>
</mat-datepicker>
TS
dateClass: MatCalendarCellClassFunction<Date> = (cellDate, view) => {
...
};
Solution
I had some weird behaviour in my application that was faking the resul.I fixed it. My final solution:
document.querySelectorAll('.mat-calendar-body-cell-content');
elements.forEach((x) => {let day: number = parseInt(x.textContent);
In the end i read the numbers in the calendar and compared them with a date. Its not the best solution but it works.
Thanks to @Eliseo for the right idea with the linked solution
Answered By - Unknown
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.