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.

    Calendar Ext2 - Colour Coded Events

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    7 Posts 3 Posters 459 Views 3 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.
    • V Offline
      vinlo2
      last edited by sdetweil

      I’ve looked through a bunch of posts and comments to try to figure out how to get the transform feature to work on my calendar to colour code events and change icons. All the calendars work until I add the below code and then the calendars don’t display at all. I am clearly missing something important and since I know little about coding I cannot figure out what I am doing wrong. If anyone can help this rookie, it is greatly appreciated. I have the pa_day class defined in the CSS file also. I also apologize for formatting - again, rookie.

      {
         module: 'MMM-CalendarExt2',
         config: {
            scenes: [{
               name: "DEFAULT",
               views: ["Upcoming", "Calendar View"],
            }],
            views: [
               {
                  name: "Upcoming",
                  mode: "weekly",
                  title: "All Calendar Events",
                  position: "top_right",
                  maxItems: 10,
                  maxDays: 1,
                  fromNow: 0,
                  slotCount: 1,
                  locale: "en",
                  timeFormat: "h:mm a",
                  hideOverflow: false,
                  filterPassedEvent: true,
                  calendars: ["SCHOOL", "FAMILY"],
               },
               {
                  name: "Calendar View",
                  mode: "week",
                  slotSubTitleFormat: "dddd",
                  slotMaxHeight: "200px",
                  type: "row",
                  weeksFormat: 'wo',
                  position: "lower_third",
                  fromNow: 0,
                  slotCount: 4,
                  locale: "en",
                  timeFormat: "h:mm a",
                  hideOverflow: false,
                  filterPassedEvent: true,
                  calendars: ["SCHOOL", "FAMILY"],
                  transform: function (event) {
                     if (event.title.search("PA day") > -1) {
                        event.icon = "noto-softball";
                        event.className = "pa_day";
                     }
                     return event;
                  }
               }
            ],
            calendars: [
               {
                  name: "FAMILY",
                  url: "https://link/calendar/ical/private.ics",
                  icon: "vaadin-family",
                  className: "FAMILY"
               },
               {
                  name: "SCHOOL",
                  url: "https://link/private.ics",
                  icon: "wpf-books",
                  className: "SCHOOL",
               }
            ]
         }
      }
      
      S M 2 Replies Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @vinlo2
        last edited by

        @vinlo2 maybe the author will post…

        but he has moved new function and support to MMM_CalendarExt3

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        V 1 Reply Last reply Reply Quote 0
        • V Offline
          vinlo2 @sdetweil
          last edited by

          @sdetweil Oh no, I’ve been plugging away at the outdated version? Lol. I’ll move over to ext3

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @vinlo2
            last edited by

            @vinlo2 note that the Ext3 modules don’t read the calendar directly anymore… they let the default calendar do that…

            so the calendar url has to be moved into the defaut calendar config

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            V 1 Reply Last reply Reply Quote 0
            • V Offline
              vinlo2 @sdetweil
              last edited by

              @sdetweil I’ll have to take some more time to look through it. Seems like a lot of it is similar. Thanks for the direction.

              1 Reply Last reply Reply Quote 0
              • M Offline
                MMRIZE
                last edited by

                Yes, I can tell you and it will not be so difficult but I’m not with my PC and I have only iPhone now. I can’t type precise answer at this moment, until the day after tomorrow, return from my business trip.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MMRIZE @vinlo2
                  last edited by

                  @vinlo2

                  1. CX2 works as standalone, so you don’t need to rely on the default calendar module. You have to include the ics URL in your config of CX2 (in calendars section. Read the Manual.)

                  2. I moved to CX3, but leave CX2 as it is. If you are satisfied with CX2, just keep to use it.

                  1 Reply Last reply Reply Quote 0
                  • 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