У меня есть решение, я создал массив dateCustomClasses условно.
let dateCustomClasses = this.getDates(minDate, maxDate);
getDates = (startDate, endDate) => {
var dates = [],
currentDate = startDate,
addDays = function (days) {
var date = new Date(this.valueOf());
date.setDate(date.getDate() + days);
return date;
};
while (currentDate <= endDate) {
let className = "blue";
if (myCondition) {
className = "red";
}
dates.push({ date: currentDate, classes: [className] });
currentDate = addDays.call(currentDate, 1);
}
return dates;
};
<input type="text" name="new_buyback_date" class="form-control" placeholder="Date"
[(ngModel)]="date" [bsConfig]="bsConfig" [minDate]="minDate"
[maxDate]="maxDate" (bsValueChange)="onDateChange($event)"
[dateCustomClasses]="dateCustomClasses" bsDatepicker required>