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-CalendarExt2

    Scheduled Pinned Locked Moved Utilities
    486 Posts 83 Posters 827.4k Views 83 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.
    • jdfraserJ Offline
      jdfraser @Guest
      last edited by jdfraser

      @Sean
      Thanks for the great module, it is the main reason for my Magic Mirror / picture frame.

      Could you explain the syntax for using the “transform” command to change the title of an event to a shorter abbreviation (e.g. “jack climbing” = > “J.C.”)? I have some items in my calendar that are displayed on the monthly view with a title “Dinner: Taco Soup” and I would like to use transform to remove the "Dinner: " from the title. I have searched the documentation and the forum, but am having a tough time figuring out how I need to specify this in my config.js (or custom.css).

      ? 1 Reply Last reply Reply Quote 0
      • ? Offline
        A Former User @jdfraser
        last edited by

        @jdfraser

        Basically, read this.
        https://github.com/eouia/MMM-CalendarExt2/wiki/Filtering-and-Sorting#transforming

        0_1576689031621_49ee04d5-231c-4662-a911-b93f39f5694e-image.png

        You need some basic skills in JavaScript. Anyway, I’ll show some examples;

        1. Original

        I’ve added two events on 25th Dec. Lunch:Taco Soup Once and Dinner:Taco Soup Twiceon my Google calendar.
        0_1576690912487_8cbe4a94-566c-41f3-aa75-763fe1b0a31a-image.png
        Hmmmm Taco Soup on Christmas, what a poor…

        It will be shown like this on MMM-CalendarExt2 without transforming;
        0_1576691004690_1f64ad4d-7173-45f2-bc25-284d12ff46d2-image.png

        1. Remove Dinner:
        transform: (event)=>{
          event.title = event.title.replace("Dinner:", "")
          return event
        }
        

        will make this;
        0_1576691065376_58de8515-e43f-47cd-a7d2-5fa9f7f6b19c-image.png

        1. give more transforming.
        transform: (event)=>{
          if (event.title.search("Dinner:") > -1) {
            event.title = event.title.replace("Dinner:", "")
            event.icon = "emojione-pot-of-food"
            event.className = "myDinnerClass"
          }
          return event
        }
        

        I’ve added icon and specific CSS class selector. So you can define your CSS class on MagicMirror/css/custom.css like this;

        .CX2 .myDinnerClass {
          color: Black;
          background-color: Yellow;
        }
        

        It will be shown like this;
        0_1576691287656_a36b2008-915c-4bdb-8029-9786042beef9-image.png !

        Of course, there would be more tricks if you know javascript somehow.

        If you are not familiar with Javascript,… hmmm sorry for you. Anyway, this is DIY project. There is no ready-made out-of-box arts.

        jdfraserJ 1 Reply Last reply Reply Quote 0
        • C Offline
          Clubjack
          last edited by

          Hello together.

          Is it possible to Show two different calendars, on two different pages (mmm-pages)?

          ? 1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @Clubjack
            last edited by A Former User

            @Clubjack
            Possible.
            You need 2 scenes which have independent views of your calendars.
            Then, read this;
            https://github.com/eouia/MMM-CalendarExt2/wiki/3.-Usage#user-defined-notification-trigger

            C 1 Reply Last reply Reply Quote 0
            • C Offline
              Clubjack @Guest
              last edited by

              @Sean
              OK.
              But i want to same looking calendars with same View.
              I try it, with coping the mmm-calendarext2 and rename it to mmm-calendarext2.2

              S ? 2 Replies Last reply Reply Quote 0
              • S Offline
                sdetweil @Clubjack
                last edited by

                @Clubjack ust make another scene like the 1st one with a different name, and put that on the next page

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • ? Offline
                  A Former User @Clubjack
                  last edited by A Former User

                  @Clubjack said in MMM-CalendarExt2:

                  I try it, with coping the mmm-calendarext2 and rename it to mmm-calendarext2.2

                  This module will not work like that.

                  But i want to same looking calendars with same View.

                  Just make one more view with the same configured values.

                  1 Reply Last reply Reply Quote 0
                  • jdfraserJ Offline
                    jdfraser @Guest
                    last edited by

                    @Sean Thank you for your quick response! I will practice my Javascript :)

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

                      @jdfraser really no javascript , just stuff in config…

                      you have for Ext2 a config section
                      which has

                      scenes: {
                           [
                               { name:  "scene1",
                                   viewes: ["view1", "view2"]
                               },
                               { name:  "scene2",            // < --- make secodn scene that looks like the 1st
                                   viewes: ["view1", "view2"]
                               },
                          ]
                      }
                      Views: {
                           [
                               { name:  "view1"
                               },
                               {  name: "view2"
                               }
                           ]
                      }
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        Clubjack
                        last edited by

                        I think there’s a little misunderstanding.
                        I would like to create several pages with mmm-pages and control them via alexa. Therefore I have to specify in the configs of mmm-pages which modules should be there on the pages.

                        Example:
                        Page 1: mmm-clock, mmm-calendarext2
                        Page 2: mmm-waether, mmm-calendarext2

                        How should I insert different scenes or views there?

                        ? 2 Replies Last reply Reply Quote 0
                        • 1
                        • 2
                        • 22
                        • 23
                        • 24
                        • 25
                        • 26
                        • 48
                        • 49
                        • 24 / 49
                        • 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