• 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

Scheduled Pinned Locked Moved Utilities
654 Posts 77 Posters 1.8m Views 81 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.
  • S Offline
    sdetweil @Lilleberg
    last edited by Nov 7, 2022, 12:41 PM

    @Lilleberg said in MMM-CalendarExt3:

    error: Your local changes to the following files would be overwritten by merge:
    MMM-CalendarExt3.css
    MMM-CalendarExt3.js

    looks like u modified the module code, and updated cannot be applied til you fix that.

    generally you never edit the source files of a module.all config goes in config.js and all css updates go is custom.css

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • B Offline
      bicolorbore586 @MMRIZE
      last edited by Nov 7, 2022, 6:56 PM

      Is there an option to hide the week numbers? I’ve managed to remove the ‘cw’ using custom.css (albeit a bit untidy)

      S 1 Reply Last reply Nov 7, 2022, 7:51 PM Reply Quote 0
      • S Offline
        sdetweil @bicolorbore586
        last edited by sdetweil Nov 7, 2022, 7:53 PM Nov 7, 2022, 7:51 PM

        @bicolorbore586 no config option, just set cw to display:none in custom.css

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 2
        • A Offline
          almightyyoshi
          last edited by Nov 9, 2022, 9:51 PM

          I finally found a touch module that I could easily use for the glance notification and have the payload step as 1. However, two things are happening:

          1: on the first press it’s going back to June. Second press goes to April. Third press goes to August. Fourth press goes to December (which would be correct, however, due to the other jumps it could just be random)

          2: no events are populating in the glance

          Here’s what I have for the button:

          {
                module: "MMM-TouchButton",
                position: "top_left",
                config: {
                    buttons: [
                         {
                          name: "Next",
                          icon: "fa fa-calendar-days",
                          notification: "CX3_GLANCE_CALENDAR",
                          payload: {instanceID: [], step: [1]},
                            },
                          ]
                        },
                     },
          
          

          And here’s my CX3 config:

          {
                      module: "MMM-CalendarExt3",
                      position: "middle_center",
                      config: {
                              mode: "month",
                              instanceID: "currentMonth",
                              firstDayOfWeek: 0,
                              useSymbol: true,
                              glanceTime: 60000,
                              calendarSet: [],
                      }
                  },
          
          

          Any thoughts?

          M 1 Reply Last reply Nov 10, 2022, 11:37 AM Reply Quote 0
          • M Offline
            MMRIZE @almightyyoshi
            last edited by MMRIZE Nov 10, 2022, 11:40 AM Nov 10, 2022, 11:37 AM

            @almightyyoshi
            Not real tested, but I think your config should be like this;

            payload: {step: 1},
            

            And about no event populating, It would be related to your maximumEntries , maximumNumberOfDays and boradcastPastEvents options of default calendar module.

            A 1 Reply Last reply Nov 10, 2022, 9:40 PM Reply Quote 0
            • A Offline
              almightyyoshi @MMRIZE
              last edited by Nov 10, 2022, 9:40 PM

              @MMRIZE
              That did it. Thanks!

              1 Reply Last reply Reply Quote 0
              • C Offline
                chadjohn2
                last edited by Nov 10, 2022, 11:26 PM

                First off, I’m a complete and utter noob with coding. I’m capable enough to get MagicMirror installed and start adding in some of the 3rd party modules. I’m now trying to get into the space of modifying CSS and such for a little added customization.

                I’m trying to something that I think should be simple but I cannot get it work for the life of me. I’ve searched the forum and this topic and found a couple pieces but I’m still struggling. Finally got frustrated enough to create an account and post.

                I’m trying to change the color of events based on the title of an event coming from a google calendar. The events are coming in fine, just not changing color.

                Based on what I have read, I need to use the eventTransformer function. I have put the following into the config.js file (including the full module for total information).

                { 
                module: "MMM-CalendarExt3",
                position: "bottom_bar",
                config: {
                			mode: "week",
                			weekIndex: "0",
                			weeksInView: "2",
                			firstDayOfWeek: "1",
                			maxEventLines: "8",
                			fontSize: "25px",
                			eventHeight: "16px"
                		},
                eventTransformer: function(event) {
                if (event.title.search('Daycare') > -1) {
                event.className = 'Daycare'
                				}
                			}	
                		}
                

                then in the custom.css file (Trying hot pink hex so it pops out):

                .CX3 .Daycare {
                background-color:#FF69B4;
                color:#FF69B4;
                }
                

                For all I know, that’s completely wrong so any help you can provide will be appreciated!

                W M 2 Replies Last reply Nov 11, 2022, 3:06 AM Reply Quote 0
                • W Offline
                  Wenike @chadjohn2
                  last edited by Nov 11, 2022, 3:06 AM

                  @chadjohn2 Try removing the }, before your event transformer text (it closes that config section but you need the event transformer in that config section). Also, per the github, your code for the event transformer needs to be something like:

                  eventTransformer: (ev) => {
                    if (ev.title.search('Daycare') > -1) ev.color = '#FF69B4'
                    return ev
                  }
                  
                  S 1 Reply Last reply Nov 11, 2022, 3:55 AM Reply Quote 0
                  • S Offline
                    sdetweil @Wenike
                    last edited by sdetweil Nov 11, 2022, 3:55 AM Nov 11, 2022, 3:55 AM

                    @Wenike your transformer is only doing style change,
                    he wants to change the class , so his transformer is ok

                    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 @chadjohn2
                      last edited by MMRIZE Nov 11, 2022, 8:21 AM Nov 11, 2022, 7:50 AM

                      @chadjohn2
                      There were several issues on your code.

                      1. You didn’t return event object in your eventTransformer function.
                        30718079-3e22-498f-88af-f332f084c764-image.png

                      2. CSS(Cascading Style Sheets) has a Speciality to determine the priority of the definitions by calculation.
                        Your .CX3 .Daycare is lower than default .CX3 .event.fullday or .CX3 .event.multiday. So in case of your event is fullday/multiday thing, your color definition would be ignored.
                        .CX3 .event.Daycare or .CX3 .event.Daycare.fullday, .CX3 .event.Daycare.multiday would work.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 15
                      • 16
                      • 17
                      • 18
                      • 19
                      • 65
                      • 66
                      • 17 / 66
                      17 / 66
                      • First post
                        167/654
                        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