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.

    Default calendar customEvents not working

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 2 Posters 62 Views 2 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.
    • P Offline
      pauabaer
      last edited by pauabaer

      Hi guys,

      I installed the newest mm version via GitHub.
      I have tested a lot within the calendar module. My iCal-calendar is shown, but the default calendar module does not work with any customEvents entries.

      
      {
                              module: "calendar",
                              header: "Familienkalender",
                              position: "top_left",
                                      config: {
                                      calendars: [
                                              {
                                              url: "my-url“,
                                              symbolClass: "fas fa-fw fa-",
                                              customEvents: [
                                                              {
                                                              keyword: "Geburtstag",
                                                              symbol: "fire"
                                                              }
                                                      ]
                                              }
                                              ]
                      }
                      },
      
      

      Can you help me to fix it? I want change the symbols first and afterwards adding some regex-entries.

      Did I miss something?
      Thanks for your help.
      Best regards
      Pauabaer

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @pauabaer
        last edited by

        @pauabaer customEvents do not go IN the calendar definition

        rather like this

                   {
                                module: "calendar",
                                header: "Familienkalender",
                                position: "top_left",
                                        config: {
                                                customEvents: [
                                                                {
                                                                keyword: "Geburtstag",
                                                                symbol: "fire"
                                                                }
                                                        ],                                    
                                               calendars: [
                                                       {
                                                             url: "my-url“,
                                                            symbolClass: "fas fa-fw fa-",
                                                      }
                                               ]
                                       }
                        },
        

        the calendar module documentation is organized into sections

        1. applies to all calendar definitions (refresh rate, maximumDays…etc)
        2. applies to A calendar definition (color, symbol, url)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • P Offline
          pauabaer
          last edited by

          Thank you a lot @sdetweil
          Now the right symbol is shown on my screen.

          Next I tried to use the transform option:

          
                          {
                                  module: "calendar",
                                  header: "Familienkalender",
                                  position: "top_left",
                                          config:{
                                                  customEvents: [
                                                          {
                                                          keyword: "Geburtstag",
                                                          symbol: "birthday-cake",
                                                          transform: {           
                                                                  search: "^(.+) (\\d{4}) Geburtstag$",           
                                                                  replace: "$1 ($2)",           
                                                                  yearmatchgroup: 2
                                                                  }
                                                          }       
                                                                  ],
                                                  calendars: [
                                                          {
                                                          url: "my-url“,
                                                          symbolClass: "fas fa-fw fa-"
                                                          }
                                                            ]
                                                  }
                          },
          

          But when I refresh the browser whithin the Kalender „Familienkalender“ is no entry anymore but the word „loading…“ but nothing new is shown after a while.

          What could this circumstance cause?

          S 1 Reply Last reply Reply Quote 0
          • S Away
            sdetweil @pauabaer
            last edited by

            @pauabaer that means there was an error

            open the developers window
            ctrl-shift-i
            select the console tab
            put cal in the filter field
            and you may see the error , I changed to match one of my cal event titles
            but the regex doesn’t work…

            Screenshot at 2025-05-09 16-46-53.png

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            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