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.

    Exclude certain events from Calendar

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    4 Posts 3 Posters 1.3k 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.
    • T Offline
      theaddies
      last edited by

      I am trying to exclude certain events from a calendar. The event is called Workout. I have dabbled quite a bit with the excludedEvents command, but have had no luck. Could someone please help me with the syntax to simply exclude events that contain the word Workout in the title? I have tried the below and many other combinations with no success. I put the command in the config.js file within the calendar config. I have not receive JS errors. It just does nothing.

      excludedEvents [ 'Workout'],
      
      mumblebajM 1 Reply Last reply Reply Quote 0
      • mumblebajM Offline
        mumblebaj Module Developer @theaddies
        last edited by

        @theaddies said in Exclude certain events from Calendar:

        excludedEvents [ ‘Workout’],

        I might be wrong but I think you might be missing a colon. It should read like this: excludedEvents: [ 'Workout'],

        Check out my modules at: https://github.com/mumblebaj?tab=repositories

        1 Reply Last reply Reply Quote 1
        • T Offline
          theaddies
          last edited by

          Unfortunately that wasn’t it. I had the : in the code. It isn’t clear to me whether the command should be in the calendar part of config.js or the default settings of calendar.js. The code below, that doesn’t work, is from the config.js.

                           {
                                   module: "calendar",
                                   header: "Work",
                                   position: "top_left",
                                   config: {
                                           maximumEntries: '5',
                                           excludedEvents: ["Workout"],
                                           calendars: [
                                                           symbol: "briefcase", url:https:www.mywebsite.com
                                                           auth: {
                                                                   user: 'xxxx',
                                                                   pass: 'xxxxxxx',
                                                                   method: 'basic'
                                                                   }
                                                           ]
                                               }
                                }
          
          
          brobergB 1 Reply Last reply Reply Quote 0
          • brobergB Offline
            broberg Project Sponsor @theaddies
            last edited by broberg

            @theaddies

                             {
                                     module: "calendar",
                                     header: "Work",
                                     position: "top_left",
                                     config: {
                                             maximumEntries: '5',
                                             excludedEvents: [ {filterBy: 'Workout', caseSensitive: false} ],
                                             calendars: [
                                                              url: 'https:www.mywebsite.com',
                                                             symbol: 'briefcase', 
                                                             auth: {
                                                                     user: 'xxxx',
                                                                     pass: 'xxxxxxx',
                                                                     method: 'basic'
                                                                     }
                                                             ]
                                                 }
                                  }
            
            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