@bradley1982 said in CalendarExt3 colour custom Css for specific name.:
.CX3 .eventTransformer: (ev) => {
if (ev.title.search(‘Evie’) > -1) ev.color = ‘#FF0000’
return ev
}
It is totally wrong. You tried to use JS in the CSS. nonsense.
.CX3 .event[data-calendar-name=“Evie”] {
color: #FF0000;
}
When you want to select the event by calendar name, you should specify the name of the target in your calendar module’s config. It makes sense when you have several calendars and need to distinguish each calendars by its name.
{
module: "calendar",
header: "Bradley Family",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "...",
name: "Evie", // <== Like this.
}
]
}
},
But what I guess is, you may have some events in ONE calendar, so want to distinguish by its partial string of the title.

/* in your config.js */
{
module: "MMM-CalendarExt3",
position: "bottom_bar",
config: {
eventTransformer: (ev) => {
if (ev.title.search('Test') > -1) {
ev.class = 'test'
}
return ev
},
}
},
/* in your css/custom.css */
.CX3 .event.test {
color: red;
}









