• 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.

Trouble with calendar.js

Scheduled Pinned Locked Moved Unsolved System
14 Posts 2 Posters 2.7k 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.
  • M Offline
    MMM-kludo
    last edited by Dec 20, 2021, 11:32 AM

    Hi:

    After the update to the current version failed at the weekend, I have completely reinstalled my MagicMirror². This has also worked in principle. However, the calendar module now always shows me absolute timeFormat. This was not the case before and I cannot change it. The setting [timeFormat: “relative”] does not work. Even with the unedited config.js.sample this behavior shows up.
    I replaced the “calendar.js” with the previous version, so the display works as desired. Only I am not release able with it.

    Does anyone have an idea?

    S 1 Reply Last reply Dec 20, 2021, 4:32 PM Reply Quote 0
    • S Away
      sdetweil @MMM-kludo
      last edited by Dec 20, 2021, 4:32 PM

      @mmm-kludo can u show the config.js entry for calendar

      you can xx out the url so it doesn’t work

      {
           module: 'calendar',
            ...
            config:{
               ....
            }
      }
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      M 1 Reply Last reply Dec 20, 2021, 5:27 PM Reply Quote 0
      • M Offline
        MMM-kludo @sdetweil
        last edited by Dec 20, 2021, 5:27 PM

        @sdetweil The URL works, the display of the timeFormat is incorrect!

        S 1 Reply Last reply Dec 20, 2021, 6:33 PM Reply Quote 0
        • S Away
          sdetweil @MMM-kludo
          last edited by Dec 20, 2021, 6:33 PM

          @mmm-kludo not my point. I want to see the config entry for calendar and do NOT want others to see your working calendar url

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          M 1 Reply Last reply Dec 21, 2021, 10:55 AM Reply Quote 0
          • M Offline
            MMM-kludo @sdetweil
            last edited by Dec 21, 2021, 10:55 AM

            @sdetweil Sorry, I must have misunderstood. For me, the behavior that no relative times are displayed already after the Installtion. Without that I have made changes in the configfile. Although the default setting is “relative”.
            All attempts on my part failed, except replacing the calendar.js.

            RaspOS version: more 5.10.63-v7l+
            Mirror version: “2.17.1”

            S 1 Reply Last reply Dec 21, 2021, 1:05 PM Reply Quote 0
            • S Away
              sdetweil @MMM-kludo
              last edited by Dec 21, 2021, 1:05 PM

              @mmm-kludo again, you haven’t provided the config.js section for the calendar.

              I want to see the exact text

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              M 1 Reply Last reply Dec 21, 2021, 3:08 PM Reply Quote 0
              • M Offline
                MMM-kludo @sdetweil
                last edited by Dec 21, 2021, 3:08 PM

                @sdetweil I have not changed anything, the exact text is:

                                {
                                        module: "calendar",
                                        header: "US Holidays",
                                        position: "top_left",
                                        config: {
                                                calendars: [
                                                        {
                                                                symbol: "calendar-check",
                                                                url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
                                                        }
                                                ]
                                        }
                                },
                

                and on the mirror I see this:

                Christmas           Saturday at 00:00
                New Year's Day                Jan 1st
                

                but I would like, for example, this:

                Help me                        Today
                Christmas                   Tomorrow
                New Year's Day             in 5 Days
                
                S 1 Reply Last reply Dec 21, 2021, 3:19 PM Reply Quote 0
                • S Away
                  sdetweil @MMM-kludo
                  last edited by sdetweil Dec 21, 2021, 3:21 PM Dec 21, 2021, 3:19 PM

                  @mmm-kludo ok, you say timeFormat: doesn’t work but u haven’t specified it in the config

                  ALL config for ANY module goes in config.js

                                  {
                                          module: "calendar",
                                          header: "US Holidays",
                                          position: "top_left",
                                          config: {
                                                 timeFormat: "relative",
                                                 ...  whatever other parms
                                                  calendars: [
                                                          {
                                                                  symbol: "calendar-check",
                                                                  url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics"
                                                          }
                                                  ]
                                          }
                                  },
                  

                  you NEVER change the source code itself…

                  config info for cal
                  https://docs.magicmirror.builders/modules/calendar.html

                  note the getRelative parm …

                  calendar has too many options (in my opinion),

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  M 1 Reply Last reply Dec 21, 2021, 3:33 PM Reply Quote 0
                  • M Offline
                    MMM-kludo @sdetweil
                    last edited by Dec 21, 2021, 3:33 PM

                    @sdetweil Thank you for your help. I have changed the value as you recommended. According to my understanding, this setting is also the default value. However, my display has not changed.

                    S 1 Reply Last reply Dec 21, 2021, 3:35 PM Reply Quote 0
                    • S Away
                      sdetweil @MMM-kludo
                      last edited by Dec 21, 2021, 3:35 PM

                      @mmm-kludo

                      note the getRelative parm …

                      how far in front of the event does the thing change to relative? in HOURS

                      xmas is 4 DAYS (48 hours), default is 6 (HOURS)

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      M 2 Replies Last reply Dec 21, 2021, 3:59 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        1/14
                        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