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 showHeader config option

    Scheduled Pinned Locked Moved Productivity
    6 Posts 2 Posters 419 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.
    • S Offline
      scottwalsh
      last edited by

      I use the MMM-CalendarExt3 module, and decided for my configuration wanted to display it without the header (in week view).

      Made the following modifications to make it into an option to turn the header on and off.

      Sharing it here as haven’t looking into how to contribute via git…

      --- MMM-CalendarExt3.js.org	2025-08-09 22:19:40.792525741 +1200
      +++ MMM-CalendarExt3.js	2025-08-09 22:22:25.620897641 +1200
      @@ -82,7 +82,7 @@
           skipDuplicated: true,
           monthIndex: 0,
           referenceDate: null,
      -
      +    showHeader: true, 
           customHeader: false // true or function
         },
       
      @@ -755,7 +755,7 @@
             config: options,
             range: [boc, eoc]
           })
      -    makeDayHeaderDom(dom, options, { boc, eoc })
      +    if (options.showHeader) makeDayHeaderDom(dom, options, { boc, eoc })
           makeWeekGridDom(dom, options, targetEvents, { boc, eoc })
           if (options.displayLegend) displayLegend(dom, targetEvents, options)
           if (options.customHeader) customHeaderDom(dom, options, { boc, eoc })
      
      S S 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @scottwalsh
        last edited by

        @scottwalsh cant you use css to hide the header?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          scottwalsh @scottwalsh
          last edited by

          I have two instances of the module, and I only want to hide the header on one instance. If I use CSS, wouldn’t it hide it for both?

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @scottwalsh
            last edited by sdetweil

            @scottwalsh use the MagicMirror module classes option to define a special class to use in the css selector
            see the options here
            https://docs.magicmirror.builders/modules/configuration.html

            module:"...",
            position:"....",
            classes:"foo bar",
            config:{
            .
            .
            }
            

            then use
            .foo
            or .bar
            instead of
            .CX3

            or use the module id in the css selector
            #module-id-string

            see the second link in my signature below about using the browser developer window elements tab to explore the generated html content, including the module id

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              scottwalsh
              last edited by

              Thanks for the tips, will take a look tomorrow to see how would do it via CSS.

              Why would you recommend doing it via CSS? Turning the headers on and off as a config option feel more intuitive to me compared to using CSS to surpress them.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @scottwalsh
                last edited by

                @scottwalsh because this module depends on css to suppress lots of other content , so its natural, and doesn’t require code change in any version

                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