嗨,我正在使用React Big Calendar。默认情况下,日历在周和日视图中显示时间从上午 12:00 到晚上 11:30,但我只想显示从上午 7:00 到下午 7 的时间范围我试图通过隐藏不需要的行来修改 CSS但日历上的事件项仍保留在其旧位置(例如:事件发生在上午 7:00 将保留在上午 10:30)。这是我的scss:
.rbc-time-content {
align-items: normal!important;
.rbc-time-gutter.rbc-time-column,
.rbc-day-slot.rbc-time-column {
.rbc-timeslot-group:nth-child(n+1):nth-child(-n+14),
.rbc-timeslot-group:nth-child(n+40):nth-child(-n+48) {
display: none;
height: 0!important;
}
}
}