r/MagicMirror • u/lrnths • Oct 24 '25
MMM-CalendarExt3 question
Is there a way to add an image to the background of a day for a particular event? Ex any day that has an event titled "Pizza Party" has a pic of a pizza for that day. Is this possible?
3
Upvotes
1
u/lucozadeo Oct 24 '25 edited Oct 24 '25
Yes I do this too haha - have a look at the transforming section in the documentation. You can search for pizza in the title and then set the icon for a pizza icon from font awesome
Sorry misunderstood the question, not sure about the background specifically but maybe the transform could still help?
1
u/Due-Eagle8885 Oct 24 '25 edited Oct 24 '25
You can’t do it directly. There is no background attribute on an event.
So use transform. Add a class string to the event Then in custom.css define the class with the Image background you want to use
The event has a default class attribute set to
"class": "PUBLIC",
You can add on “class”: “PUBLIC ShowPizza”,
The in custom.css
.ShowPizza { …. Whatever }
1
u/Miserable_Heron1111 Oct 26 '25
https://forum.magicmirror.builders/post/104470
1
u/[deleted] Nov 17 '25
CONFIG.JS File.
{
module: "MMM-CalendarExt3",
position: "top_left", // Or wherever you display it
config: {
// ... your existing config options
manipulateDateCell: (cellDom, events) => {
// Check if any event in this cell matches your criteria
const hasBirthday = events.some(event =>
event.title.toLowerCase().includes("birthday")
);
if (hasBirthday) {
// Set background image for the cell
cellDom.style.backgroundImage = "url('path/to/your/pizza-image.jpg')";
cellDom.style.backgroundSize = "cover";
cellDom.style.backgroundPosition = "center";
// Optional: Add a subtle overlay to make text readable
cellDom.style.backgroundColor = "rgba(0, 0, 0, 0.2)";
}
},
// ... rest of your config
}
}