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.

    absolute date in calendar module

    Scheduled Pinned Locked Moved Troubleshooting
    19 Posts 9 Posters 15.6k Views 9 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.
    • Q Offline
      qqqqqqqq
      last edited by

      Here is my main config file

      {
      			module: 'calendar',
      			header: 'Your Calendar',
      			position: 'top_left',
      			config: {
      				timeformat: 'absolute',
      				calendars: [
      					{
      						symbol: 'calendar-check-o ',
      						url: 'webcal://calendar.google.com/calendar/ical/....ics'
      					},
      					{
      						symbol: 'calendar-check-o ',
      						url: 'webcal://calendar.google.com/calendar/ical/....ics'
      					},
      					{
      						symbol: 'facebook-official ',
      						url: 'webcal://localhost:8080/modules/Cals/FbBirthday.ics'
      
      					},
      					{
      						symbol: 'calendar ',
      						url: 'webcal://calendar.google.com/c.....ics'
      					}
      				]
      			}
      		},
      		{
      			module: 'compliments',
      
      1 Reply Last reply Reply Quote 0
      • brobergB Offline
        broberg Project Sponsor
        last edited by

        You should also set urgency to 0

        1 Reply Last reply Reply Quote 1
        • yawnsY Offline
          yawns Moderator
          last edited by

          Please try to write timeFormat instead of timeformat, this is case sensitive :)
          Also try to play around with urgency

          https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar

          1 Reply Last reply Reply Quote 1
          • Q Offline
            qqqqqqqq
            last edited by

            Okay, made both the changes, fixed the case in “timeFormat” and added

            urgency: '0',
            

            right next to the timeFormat tag.

            But, now the events appear like this

            event 1 The day after tomorrow
            event 2 Feb 19th
            event 3 Feb 21st

            Still need to fix event 1

            1 Reply Last reply Reply Quote 0
            • yawnsY Offline
              yawns Moderator
              last edited by

              Please replace '0' with 0

              Numbers should not be written with quotation marks

              1 Reply Last reply Reply Quote 0
              • Q Offline
                qqqqqqqq
                last edited by

                Nope, still the same.

                Btw, i should let you know that I am start the MagicMirror by using the command

                npm start
                

                Should I be using some other method to start it? Do I need to clear cache or something like that? :slight_frown:

                yawnsY 1 Reply Last reply Reply Quote 0
                • yawnsY Offline
                  yawns Moderator @qqqqqqqq
                  last edited by

                  @qqqqqqqq
                  Starting your mirror for testing purpose is just fine.

                  Please try this:

                  ...
                  	config: {
                  		timeFormat: 'absolute',
                  		urgency: 0,
                  		getRelative: 0,
                  		calendars: [
                  ...
                  
                  1 Reply Last reply Reply Quote 0
                  • Q Offline
                    qqqqqqqq
                    last edited by qqqqqqqq

                    I’ve updated the values in both, the main config file & the calendar.js (in the modules folder) but it’s still the same.

                    Here is the image. http://pasteboard.co/z6KcmVgLB.jpg

                    strawberry 3.141S 1 Reply Last reply Reply Quote 0
                    • strawberry 3.141S Offline
                      strawberry 3.141 Project Sponsor Module Developer @qqqqqqqq
                      last edited by strawberry 3.141

                      @qqqqqqqq with the current implementation this is the expected behaviour

                      } else if (event.startDate - now < 2 * oneDay && event.startDate - now > 0) {
                        if (this.translate("DAYAFTERTOMORROW") !== "DAYAFTERTOMORROW") {
                          timeWrapper.innerHTML = this.capFirst(this.translate("DAYAFTERTOMORROW"));
                        } else {
                          timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
                        }
                      }
                      

                      it will be always relative

                      EDIT: this is only for fullday events

                      Please create a github issue if you need help, so I can keep track

                      Q 1 Reply Last reply Reply Quote 1
                      • yawnsY Offline
                        yawns Moderator
                        last edited by

                        I tested it yesterday and my calendar showed “tomorrow at 15:30” and “Saturday at 14:00”

                        That is as absolute as it gets, imho

                        1 Reply Last reply Reply Quote 0
                        • Q Offline
                          qqqqqqqq @strawberry 3.141
                          last edited by

                          @strawberry-3.141

                          Most of my events are Fullday events. So, yeah.

                          Right now, I guess it gets relative for next 3/4 days, and absolute thereafter.

                          1 Reply Last reply Reply Quote 0
                          • W Offline
                            wered
                            last edited by

                            I was running into the same issue with not being able to disable the relative days, My issue was that when something was set to “The day after tomorrow” it made the module far to wide and overwrote other modules(Im using an older low res screen). To fix this I edited the file at MagicMirror/modules/default/calendar/calendar.js and replaced line 237 with the entry below, I changed it to two days which is much shorter but you can change it to whatever you want.

                            timeWrapper.innerHTML = this.capFirst(this.translate(“Two Days”));

                            The line originally was.

                            timeWrapper.innerHTML = this.capFirst(this.translate(“DAYAFTERTOMORROW”));

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              MarkNygaard
                              last edited by MarkNygaard

                              Is it a big task to change so that it displays weekdays for the current week and then dates when the event is further away?

                              So lets say it is Wednesday. The calendar would then display it like:
                              Event Today
                              Event Thursday
                              Event Saturday
                              Event Sunday
                              Event Oct 9
                              Event Oct 11
                              …

                              Edit: Can see that the urgency option takes x amount of days. Would be nice if the urgency function returns the days(Monday, Tuesday…) in stead of the amount of days away.

                              1 Reply Last reply Reply Quote 0
                              • Alex2020A Offline
                                Alex2020
                                last edited by sdetweil

                                E’ possibile impostare un simbolo diverso da un altro a secondo dell’evento?In caso la risposta fosse SI potreste dirmi come dovrei fare ?Grazie.

                                english

                                Is it possible to set a different symbol from another according to the event? If the answer was YES could you tell me how I should do it? Thanks.

                                1 Reply Last reply Reply Quote 0
                                • Alex2020A Offline
                                  Alex2020
                                  last edited by sdetweil

                                  Come si fa a mettere un simbolo diverso per ogni giorno della settimana?Grazie.

                                  english

                                  How do you put a different symbol for each day of the week? Thanks.

                                  1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    pablo_z @qqqqqqqq
                                    last edited by

                                    @qqqqqqqq
                                    You must use:
                                    timeFormat: ‘absolute’,
                                    getRelative: 0,
                                    urgency: 0,
                                    in the config.js

                                    uros76U 1 Reply Last reply Reply Quote 0
                                    • uros76U Offline
                                      uros76 @pablo_z
                                      last edited by

                                      @pablo_z said in absolute date in calendar module:

                                      @qqqqqqqq
                                      You must use:
                                      timeFormat: ‘absolute’,
                                      getRelative: 0,
                                      urgency: 0,
                                      in the config.js

                                      I wanted the same, to have just dates of events shown. This helped me, thanks.

                                      My magicmirror projects: https://forum.magicmirror.builders/post/79889, https://forum.magicmirror.builders/post/93241 and https://forum.magicmirror.builders/post/94586

                                      1 Reply Last reply Reply Quote 0

                                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                      With your input, this post could be even better 💗

                                      Register Login
                                      • 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