Fullcalendar - невозможно изменить цвет фона календаря - PullRequest
2 голосов
/ 20 апреля 2020

Я пытаюсь изменить цвет фона fullcalendar.

Я попробовал эти методы (без успеха):

td .fc-unthemed td.fc-today {
 background: red !important;
}

.fc-unthemed td.fc-today > tr > td{
 background: blue !important;
}

.fc-unthemed td.fc-today td{
 background: black !important;
}

.fc-unthemed td.fc-today {
 background: green !important;
 background: linear-gradient(90deg, rgba(204, 204, 204, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.fc td {
 background-color: #333 !important;
}

.fc th {
  background-color: #333 !important;
}

Мои зависимости: "@ angular / core": "~ 9.0.5", "@ fullcalendar / angular": "^ 4.4.5-бета", "@ fullcalendar / core": "^ 4.4.0",

enter image description here

Обновление: я пытался добавить класс в fullCalendar (без успеха)

<full-calendar
  #specCalendar
  ...
  [className]="'spectator-calendar'"
  >

1 Ответ

1 голос
/ 20 апреля 2020

Вам нужно попробовать css изменения в общем стиле. css. Вы не можете изменить его, если вы пишете в компоненте. css.

если у вас больше, чем в календаре, добавьте класс в свой календарь, добавьте класс <full-calendar class="testClass " Напишите эти коды в своем стиле. css

    .testClass .fc-view-container {
    background: #ffffff57  !important
}
.testClass .fc-unthemed th, .fc-unthemed td, .fc-unthemed thead, .fc-unthemed tbody, .fc-unthemed .fc-divider, .fc-unthemed .fc-row, .fc-unthemed .fc-content, .fc-unthemed .fc-popover, .fc-unthemed .fc-list-view, .fc-unthemed .fc-list-heading td {
    border-color: #949494;
}
.testClass  .fc-time-grid .fc-slats {
   background:#333 !important;
   color:white;
}
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...