在 ng-pick-datetime 中更改给定日期的样式

Change style of a given day in ng-pick-datetime

我在前端使用 Angular Date Time Picker

我在后端的方法为用户计算所有不可用的日期。我想在用户不可用的每一天更改日历中的颜色。基本上我想找到一种通过在不可用的日子更改颜色来设置组件样式的方法。

我似乎找不到办法;有人能指出我正确的方向吗?或者甚至可以推荐另一种方法来做到这一点。

过滤掉不可用的日子,然后这个 CSS 应该可以解决问题:

.owl-dt-calendar-cell-disabled {
  color: #ff0000;
}

它基本上将任何禁用日期的颜色设置为红色。

在这里你可以改变颜色 -----> src\styles.scss

前任

.owl-dt-calendar-table .owl-dt-calendar-cell-in-range {
    background: rgba(255, 0, 0, 0.2);
}

.owl-dt-container-info .owl-dt-container-info-active {
    color: red;
}

.owl-dt-calendar-table .owl-dt-calendar-cell-selected {
    color: rgba(255, 255, 255, .85);
    background-color: red;
}

.owl-dt-container-buttons {
  color: #3f51b5;
}

image here