• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-CalendarExt3 color formatting

Scheduled Pinned Locked Moved Solved Troubleshooting
15 Posts 6 Posters 3.9k Views 7 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.
  • M Offline
    MMRIZE @jlward73
    last edited by MMRIZE Jan 26, 2024, 3:58 PM Jan 26, 2024, 3:54 PM

    @jlward73
    Unfortunately, default calendar module doesn’t broadcast custom color of events, only transfer original color assigned in calendar. Shamed.
    Instead you can transform events in CX3 itself.

    J 1 Reply Last reply Jan 26, 2024, 11:12 PM Reply Quote 0
    • J Offline
      jlward73 @MMRIZE
      last edited by Jan 26, 2024, 11:12 PM

      @MMRIZE I’m not concerned about the keyword transformation custom color going through. What I am really trying to figure out is why the original colors that I assign (#385723 for ‘holidays’, and #7030A0 for ‘Family’) are not showing up on the CalendarExt3 Module. The symbols are passing properly, even the keyword transform for “birthday-cake”, but none of the colors are passing.

      S M 2 Replies Last reply Jan 26, 2024, 11:37 PM Reply Quote 0
      • S Offline
        sdetweil @jlward73
        last edited by sdetweil Jan 26, 2024, 11:38 PM Jan 26, 2024, 11:37 PM

        @jlward73 as the data is broadcast to all modules, you could install one of the notification modules and look at the event data to see what is there

        also try “red” or “green” as the color, altho that shouldn’t matter

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        J 1 Reply Last reply Jan 28, 2024, 6:05 PM Reply Quote 0
        • M Offline
          MMRIZE @jlward73
          last edited by Jan 27, 2024, 1:07 AM

          @jlward73
          About the style of event;

          8c0b2af8-7a7d-4f88-9092-1dff9e791054-image.png

          The default styles are like these;

          • Singleday Event (start and end in one day)
            • symbol : calendarColor
            • text : white (defaultColor)
            • background : none
          • Fullday Event & Multiday Event
            • background : calendarColor
            • symbol & text : white or black (oppositeColor) / oppositeColor is calculated by calendarColor to get more visibility by contrast.

          So, I think you are asking text of singleday event. To be honest, I don’t like the colorful text, so it is not considered in the default style.

          However, of course, you can override it.

          /* In your custom.css */
          .CX3 .event.singleday .headline .title,
          .CX3 .event.singleday .headline .time {
            color: var(--calendarColor);
          }
          

          Then you can get this.
          ebf942ae-b8dc-4fe5-aaae-0ab13db73a8a-image.png

          1 Reply Last reply Reply Quote 0
          • J Offline
            jlward73 @sdetweil
            last edited by Jan 28, 2024, 6:05 PM

            @sdetweil How do I do that? As I’m reading the posts from you and MMRIZE, I feel like the code is right in my default calendar and in the css file for CalendarExt3, but maybe the color property is not being broadcast, so I would like to check that.

            S M 2 Replies Last reply Jan 28, 2024, 9:21 PM Reply Quote 0
            • S Offline
              sdetweil @jlward73
              last edited by Jan 28, 2024, 9:21 PM

              @jlward73 look in the 3rd party modules list for one that shows the notifications in the developers window (ctrl-shift-i, select the console tab)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • M Offline
                MMRIZE @jlward73
                last edited by Jan 29, 2024, 8:49 AM

                @jlward73
                https://github.com/MMRIZE/MMM-LogExt
                You can track Frontend logs and notifications in the backend log with ease.

                B 1 Reply Last reply Jan 29, 2024, 6:51 PM Reply Quote 0
                • B Offline
                  BKeyport Module Developer @MMRIZE
                  last edited by Jan 29, 2024, 6:51 PM

                  Why aren’t you guys using the transformer?

                  eventTransformer: (ev) => {
                  					if (ev.title.search("🏠") > -1) {
                  						ev.title = ev.title.replace("🏠 Personal Commitment", "🏠 Personal Event");
                  						ev.color = 'yellow';
                  					}
                  					if (ev.title.search("✈ Flight") > -1) {
                  						ev.title = ev.title.replace("✈ Flight", "🏠 Personal Event");
                  						ev.color = 'yellow';
                  					}
                  					if (ev.title.search("busy") > -1) {
                  						ev.title = ev.title.replace("busy", "🏠 Mom Event");
                  						ev.color = 'yellow';
                  					}
                  					if (ev.title.search("Weekley") > -1) {
                  						ev.title = ev.title.replace("Weekley", "Weekly");
                  					}
                  					return ev
                  				}
                  

                  The "E" in "Javascript" stands for "Easy"

                  1 Reply Last reply Reply Quote 0
                  • Z Offline
                    ZiggidyZ
                    last edited by Jan 29, 2024, 6:59 PM

                    I understand 100% what you are saying, I had this same issue. What you are experiencing is the DEFAULT of CX3, that is how it looks if you don’t edit anything. By default the ICON next to the event will be the color you configured, but the event text will all be white. To change this you will need to edit your CUSTOM css file, DO NOT edit the css file inside of the module. I started off making that same mistake. The trouble in doing that, is that when a module gets updated, you lose anything you did. The customizations should be done in that custom.css file and should be backed up. Copy the code below into your ~MagicMirror/css/custom.css file, save, then refresh the browser window (I use the MMM-Remote-Control to refresh mine remotely), and you should see it load with the colors you configured in the default calendar module.

                    * CalendarExtende3 */
                    
                    /* Sets event titles to configured color */
                    .CX3A .event .description {
                      display: none;
                    }
                    
                    .CX3A .event .location {
                      display: none;
                    }
                    

                    I have 10 different calendars which my default calendar loads, all of which are displayed in CX3 with no issues.

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      jlward73
                      last edited by Jan 29, 2024, 8:50 PM

                      So I figured out what the problem was, and it was much simpler than I suspected. For some reason, in my default calendar module, I used
                      module: 'calendar' instead of module: "calendar" in the config file. When I ran npm run config:check, it made me change many of my quotation marks to “correct” the syntax. When I went through and changed everything to the double quotes, the color coding passed through to CalendarExt3 just as expected/designed. Now, I think I can go through and tweak the single day events as MMRIZE was suggesting to match my background pictures so they stand out appropriately for my set up. Thank you for all the guidance.

                      G S 2 Replies Last reply Feb 28, 2024, 1:59 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/15
                        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