MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-CalenarExt3 : eventTransformer not working on evets with specific start time

    Scheduled Pinned Locked Moved Solved Troubleshooting
    1 Posts 1 Posters 87 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Hooch_
      last edited by

      In the code below, events with “Bday” in the title are correctly colored but the “birthday-icon” is not applied. They are all full day events. The intent is that each person has a color and icon applied to their events but events with a specific start time are not transformed. What am I doing wrong?

      I will appreciate specifics and examples of correct code. I’ve had the Pi running a week and these are my first attempts at coding and I’m struggling with some of it.

      I tried using eventNames and then using the custom.css to color events but couldn’t get that to work for any events including full day.

        ```
      

      module: “MMM-CalendarExt3”,
      position: “bottom_bar”,
      title: “May Cubed”,
      config: {
      mode: “month”,
      instanceId: “combinedCalendar”,
      locale: ‘en-US’,
      maxEventLines: 6,
      showMore: true,
      firstDayOfWeek: 0,
      useMarquee: false,
      calendarSet: [], //<-- can enter “name of calendar from calendar module” to display only that one. Works in combination with InstanceId

      	eventTransformer: (ev) => {
      		if (ev.title && ev.title.search("Bday") > -1) {
      			ev.color = "#3056FF"
      			//ev.symbol = "birthday-cake" <--is there something to do this in transform? I have them as keyword customEvents under the calendar module
      
      		} else if (ev.title && ev.title.search("Name1") > -1) {
      			ev.color = "#80ef80",
      			//ev.symbol = "flower-tulip" <--same comment as above
      
      1 Reply Last reply Reply Quote 0
      • H Hooch_ has marked this topic as solved on
      • 1 / 1
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy