ОС
Size: a a a
ОС
AY
ОС
<mat-calendar #
calendar [dateClass]="dateClass"></mat-calendar>
D
ngOnChanges
сначала выполняется «IN», а потом BEFORE. Не подскажите почему так и как это исправить?AY
ОС
ОС
D
D
D
AY
AY
ОС
ОС
ОС
ОС
dateClass() {
return (date: Date): MatCalendarCellCssClasses => {
const highlightDate = this.inputData
?.map(({ lastDay }) => new
DateDate(lastDay))
.some((d: Date) => d.getDate() === date.getDate());
return highlightDate ? 'date-class' : '';
};
}
AY
AY
dateClass() {
return (date: Date): MatCalendarCellCssClasses => {
const highlightDate = this.inputData
?.map(({ lastDay }) => new
DateDate(lastDay))
.some((d: Date) => d.getDate() === date.getDate());
return highlightDate ? 'date-class' : '';
};
}
ОС
AY
@Input()
?