• Resolved SRD75

    (@srd75)


    Hi Folks,

    Is there a way to use CSS to target days that have an event?

    We’d like to change the background color of days that have events in the month view.

    Help appreciated,
    Steve

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support tristan083

    (@tristan083)

    Hi @srd75,

    I don’t think there is a parent selector in CSS that would allow for the realization of what you’re trying to do. You would be better off using jQuery or javascript on this one.

    Plugin Support tristan083

    (@tristan083)

    Hey @srd75 ,

    I completely missed this. My apologies.

    As it turns out there’s a recent CSS selector — has(). You can make use of this selector to change the background of the cell like so:

    .tribe-events-calendar-month__day-cell:has(.type-tribe_events) {
        background-color: some-color;
    }

    Please feel free to let me know how you go.

    Plugin Support WilloftheD

    (@abzlevelup)

    Hi @srd75,

    We haven’t heard from you in a while, so I’m going to mark this as resolved. Feel free to start a new thread if you have any more questions.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘css: select days that have an event’ is closed to new replies.