<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-CalendarExt3 - wrong icon shown in legend]]></title><description><![CDATA[<p dir="auto">Hi @all</p>
<p dir="auto">I have an issue with the icons/symbols, that are shown in the legend. Sometimes the legend shows an icon of the event (eventTransformer) instead of the default-calendar-icon. I am using  iconify icons.</p>
<p dir="auto">For a better understanding please have a look at the screenshot:<br />
e.g. the yellow calendar. The default icon should be a brick-head one. You can find it e.g. on Monday at “LAC Training”. The Legend instead shows the bread icon. I am using the bread-icon via eventTransformer only for events that calls “Brotbüchse”.<br />
Why the legend shows this icon instead of  the default one?</p>
<p dir="auto"><img src="/assets/uploads/files/1730100687539-calendarext3.jpeg" alt="CalendarExt3.jpeg" class=" img-fluid img-markdown" /></p>
<p dir="auto">Here the main code of the calendar module:</p>
<pre><code>                {
                        module: "calendar",
                        header: "TErmINe",
                        //position: "top_left",
                        config: {
                                defaultSymbolClassName: '',
                                useIconify: true,
                                broadcastPastEvents: true, 
                                calendars: [
                                        {
                                                name: "Ludwig", 
                                                color: "#CD2626",
                                                fetchInterval: 5 * 60 * 1000,
                                                symbol: "game-icons:trumpet",
                                                url: "webcal:"
                                        },
                                        {
                                                name: "Albrecht",
                                                color: "#EEEE00",
                                                fetchInterval: 5 * 60 * 1000,
                                                symbol: "ph:lego-smiley-light",
                                                url: "webcal:"
                                        },
                                        {
                                                name: "Samuel",
                                                color: "#4876FF",
                                                symbol: "healthicons:running",
                                                fetchInterval: 5 * 60 * 1000,
                                                url: "webcal:"
                                        },
                                        {
                                                name: "Abfall",
                                                color: "#919191",
                                                symbol: "solar:trash-bin-minimalistic-outline",
                                                fetchInterval: 5 * 60 * 1000,
                                                url: "webcal://localhost:8080/"
                                        },
                                        {
                                                name: "Franziska",
                                                symbol: "fluent-emoji-high-contrast:unicorn",
                                                /*color: "#800080",*/
                                                color: "#E066FF",
                                                fetchInterval: 5 * 60 * 1000,
                                                url: "webcal:"
                                        },
                                       {
                                                name: "Daniel",
                                                color: '#008000',
                                                symbol: "game-icons:full-motorcycle-helmet",
                                                fetchInterval: 5 * 60 * 1000,
                                                url: "webcal:"
                                        },
                                        {
                                                name: "Familie",
                                                color: "#FF8C00",
                                                symbol: "material-symbols:family-restroom",
                                                fetchinterval: 5 * 60 * 1000,
                                                url: "webcal:"
                                        },
                                        {
                                                name: "Jahrestage",
                                                color: "#622C00",
                                                symbol: "iconoir:birthday-cake",
                                                fetchInterval: 5 * 60 * 1000,
                                                url: "webcal:"
                                        }
                                ]
                        }
                },
</code></pre>
<p dir="auto">Here you can find the config of the CalendarExt3 module:</p>
<pre><code>                {
                        module: "MMM-CalendarExt3",
                        position: "upper_third",
                        header: "14-Tage Vorschau",
                        title: "14 Tage Übersicht",
                        config: {
                                refreshInterval: 5 * 60 * 1000,
                                useIconify: true,
                                mode: "week",
                                displayLegend: true,
                                displayEndTime: false,
                                weekIndex: 0,
                                weeksInView: 2,
                                instanceId: "basicCalendar",
                                locale: 'de-DE',
                                useMarquee: true,
                                maxEventLines: 7,
                                fontSize: '17px',
                                eventHeight: '40px',
                                firstDayOfWeek: 1,
                                useWeather: false,
                                showMore: true,
                                skipDuplicated: false,
                                calendarSet: ['Ludwig', 'Samuel', 'Albrecht', 'Daniel','Franziska', 'Familie', 'Abfall', 'Jahrestage'],

                                eventTransformer: (ev) =&gt; {
                                        if (ev.title.search('Saxophon') &gt; -1) ev.symbol = ["game-icons:saxophone"]
                                        if (ev.title.search('Brotbüchse') &gt; -1) ev.symbol = ["ph:bread"]
                                        if (ev.title.search('Sport Vorschule') &gt; -1) ev.symbol = ["solar:bottle-outline"]
                                        if (ev.title.search('Jugendfeuerwehr') &gt; -1) ev.symbol = ["ph:siren-light"]
                                        if (ev.title.search('Gitarre') &gt; -1) ev.symbol = ["ph:guitar-light"]
                                        if (ev.title.search('Geburtstag') &gt; -1) ev.symbol = ["simple-line-icons:present"]
                                        if (ev.title.search('GTA Fußball') &gt; -1) ev.symbol = ["game-icons:soccer-ball"]
                                        if (ev.title.search('GTA Handball') &gt; -1) ev.symbol = ["mdi:handball"]
                                        if (ev.title.search('Treffen') &gt; -1) ev.symbol = ["tabler:pacman"]
                                        if (ev.title.search('FT:') &gt; -1) ev.symbol = ["ion:calendar-outline"]
                                        return ev
                                }
                        }
                },
</code></pre>
<p dir="auto">Can you help to find the the root cause of the problem?</p>
]]></description><link>https://forum.magicmirror.builders/topic/19084/mmm-calendarext3-wrong-icon-shown-in-legend</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 19:34:37 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19084.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Oct 2024 07:37:41 GMT</pubDate><ttl>60</ttl></channel></rss>