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 Module | Countdown until full day events

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    6 Posts 2 Posters 824 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
      p1lspeda
      last edited by

      Hi,
      i’m using the default calendar module to give me an overview of upcoming public holidays.
      I’m not interested in the actual date, but rather more how many more days until the next public holiday.

      I cannot for the life of me get this to work.
      This is my config.js

                      {
                              module: "calendar",
                              position: "bottom_left",
                              header: "Public Holidays",
                              config: {
                                      colored: false,
                                      coloredSymbolOnly: false,
                                      maximumEntries: 10,
                                      maximumNumberOfDays: 180,
                                      timeFormat: "relative",
                                      getRelative: 90,
                                      urgency: 90,
                                      calendars: [
                                              {
                                                      url: 'https://calendar.google.com/calendar/ical/en.german%23holiday%40group.v.calendar.google.com/public/basic.ics',
                                                      symbol: 'calendar', // GERMAN HOLIDAYS
                                              },
                                      ],
                              },
                      },
      

      The leads to the following calendar showing up:
      4bef9645-f8a7-4d85-b8a6-57d99bb074f5-image.png

      I does not seem to make a difference if I change

      timeFormat: "relative",
      

      to

      timeFormat: "absolute",
      

      I am sure this can be achieved, because another instance of the default calendar gives me infos on upcoming events such as “in 2 Days”, “Tomorrow” etc.

      Any ideas why this doesn’t work on my Public Holiday Calendar ?

      Thanks

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

        @p1lspeda getRelative

        but its HOURS, not days

        so if U expect thru November its 60*24 hours

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        P 1 Reply Last reply Reply Quote 0
        • P Offline
          p1lspeda @sdetweil
          last edited by

          @sdetweil
          Thanks for your help.
          I edited it to

          module: "calendar",
                                  position: "bottom_left",
                                  header: "Public Holidays",
                                  config: {
                                          colored: false,
                                          coloredSymbolOnly: false,
                                          maximumEntries: 10,
                                          maximumNumberOfDays: 180,
                                          timeFormat: "relative",
                                          getRelative: 90 * 24,
                                          urgency: 90,
                                          calendars: [
          
          

          which unfortunately didn’t make any difference.
          https://forum.magicmirror.builders/topic/13278/calendar-how-to-change-in-2-days
          Covers my issue, and here the author mentions issues with full day events. Any chance this could be the culprit ?

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

            @p1lspeda there is a bug in the code

            for 2.21 do this

            edit ~/MagicMirror/modules/default/calendar/calendar.js

            comment out line 383

            						//if (event.fullDayEvent) {
            							// Full days events within the next two days
            

            and change line 394 like this (comment out the close of the IF above and the else

            						/*} else*/ if (event.startDate - now 
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              p1lspeda @sdetweil
              last edited by

              @sdetweil
              Thank you so much.
              Looks like we’re getting there.
              If the current Public Holiday could be described with “Today/now”, it would be the cherry on the cake.

              eaeb2ca1-42fc-4edf-b20a-c64d54cdca71-image.png

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

                @p1lspeda no mechanism to create special formatting

                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