Create a repeating "Closed" event and color the containing day cell.
Pie Calendar does include the ability to black out certain dates, preventing any events from showing on the calendar for those dates.
Sometimes, however, you need to have a visual indicator that your business or venue is closed.
To do that:
- Create an all-day event that repeats on the day you're off or closed. For example, mine will be titled "Closed."
- Set up its first occurrence and a recurrence rule so it occurs on the correct days. In my example, I set the "Closed" event up to recur on the 3rd Tuesday each month.
- Add this CSS via a code snippet or similar, make sure the "Closed" text matches the title of the event you just created:
.fc .fc-daygrid-day:has( [aria-label*="Closed"] ) {
background: yellow;
}
This will apply a yellow background color to the monthly day cell that contains the "Closed" event. You'll need to update the "Closed" text in the aria-label* selector to ensure it matches the name of your event's title, and doesn't match other events that appear on the calendar.
The "Closed" event can be used for displaying helpful information for potential visitors.
If you want to hide the "Closed" event, you can do so by adjusting the CSS slightly:
.fc .fc-daygrid-day:has( [aria-label*="Closed"] ) {
& [aria-label*="Closed"] {
display: none;
}
background: yellow;
}
This will still color the cell, but it will hide the "Closed" event.