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.

    Cant use showEnd icloud cal

    Scheduled Pinned Locked Moved Solved Troubleshooting
    30 Posts 3 Posters 2.3k Views 3 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
      sdetweil @sdetweil
      last edited by

      @evroom
      change lines 415 —

      				if (this.config.timeFormat === "absolute") {
      					// Use dateFormat
      					timeWrapper.innerHTML = CalendarUtils.capFirst(moment(event.startDate, "x").format(this.config.dateFormat));
      					// Add end time if showEnd
      					if (this.config.showEnd) {
      						if (event.startDate !== event.endDate) {
      							//  duration here, display end if requested
      						  if(this.config.showEndsOnlyWithDuration){
      								timeWrapper.innerHTML += "-";
      								timeWrapper.innerHTML += CalendarUtils.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat));
      							}
      						}
      					}
      					// For full day events we use the fullDayEventDateFormat
      					if (event.fullDayEvent) {
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      evroomE 1 Reply Last reply Reply Quote 0
      • evroomE Offline
        evroom @sdetweil
        last edited by evroom

        @sdetweil

        Sorry, do not want to cause confusion.
        One should probably not do a quick test right after a full working day:-)
        The number of test cases seems endless.

        Do I remove the earlier changes ((lines 437 and 439) before changing line 415 ?

        MagicMirror version: 2.30.0
        Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

        Test environment:
        MagicMirror version: v2.30.0
        Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

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

          @evroom said in Cant use showEnd icloud cal:

          The number of test cases seems endless.

          indeed… calendar is a tricky beast

          Do I remove the earlier changes ((lines 437 and 439) before changing line 415 ?
          no… the end of this change is just before the prior , match up that last line

          working on getting this into the update now, creating testcases!

          Sam

          How to add modules

          learning how to use browser developers window for css changes

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

            I have posted an updated fixcaldates2

            this also resolves the showEndsOnlyWithDuration
            and adds support for showEnd:true with full day events (non-repeating)
            like vacation mon-fri, all day

            just

            git pull
            

            to update…
            this is my fork, not the official pull request at this time

            if you are just getting this for the 1st time. do

            git clone https://github.com/sdetweil/MagicMirror.git newmm
            cd newmm
            git checkout fixcaldates2
            npm run install-mm
            

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            evroomE 1 Reply Last reply Reply Quote 0
            • evroomE Offline
              evroom @sdetweil
              last edited by

              @sdetweil

              Sam,

              The option showEndsOnlyWithDuration is not described yet on https://docs.magicmirror.builders/modules/calendar.html.

              The interaction / dependancy with showEnd also needs to be documented.

              I do not know if documentation issues also can / should be done on https://github.com/MagicMirrorOrg/MagicMirror.

              MagicMirror version: 2.30.0
              Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              Test environment:
              MagicMirror version: v2.30.0
              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              evroomE S 2 Replies Last reply Reply Quote 0
              • evroomE Offline
                evroom @evroom
                last edited by

                @sdetweil

                Sam,

                Whilst testing your last changes, I sort of see a need for a new date format parameter.
                For an event with duration, spanning multiple days.
                E.g. spanningDayEventDateFormat.

                [TestCal: TIMESPAN_HOLIDAY]

                BEGIN:VEVENT
                DTSTART:20241125T110000Z
                DTEND:20241127T160000Z
                DTSTAMP:20241026T091719Z
                UID:1lk06o70p9bp21ln3pdfda4ng0@google.com
                CREATED:20241026T090035Z
                LAST-MODIFIED:20241026T090035Z
                SEQUENCE:0
                STATUS:CONFIRMED
                SUMMARY:TestCal: TIMESPAN_HOLIDAY
                TRANSP:OPAQUE
                END:VEVENT
                

                For events with duration. spanning one night, like an overnight flight, it is not really necessary, but not really bad either.

                [TestCal: OVERNIGHT_FLIGH]

                BEGIN:VEVENT
                DTSTART:20241202T190000Z
                DTEND:20241203T030000Z
                DTSTAMP:20241026T091719Z
                UID:0s4flhmaf7p6q5atemshns4upp@google.com
                CREATED:20241026T090148Z
                LAST-MODIFIED:20241026T090215Z
                SEQUENCE:0
                STATUS:CONFIRMED
                SUMMARY:TestCal: OVERNIGHT_FLIGHT
                TRANSP:OPAQUE
                END:VEVENT
                

                The reasoning behind it is following:
                For a ‘normal’, single, event I am not really interested in the full end date format (dateEndFormat).
                That is why I normally use dateEndFormat: "HH:mm".
                But for an event with duration, spanning multiple days, the setting dateEndFormat: "ddd MMM D - HH:mm" makes more sense.

                dateFormat: “ddd MMM D - HH:mm”
                dateEndFormat: “HH:mm”
                fullDayEventDateFormat: “ddd MMM D”
                [good for normal events, ‘bad’ for spanning events]:
                20241026_TestCal_true_true_timespan_hhmm.png

                dateFormat: “ddd MMM D - HH:mm”
                dateEndFormat: “ddd MMM D - HH:mm”
                fullDayEventDateFormat: “ddd MMM D”
                [‘bad’ for normal events, good for spanning events]:
                20241026_TestCal_true_true_timespan_DDMMhhmm.png

                I hope I could explain it well enough.
                And that it makes sense. :-)

                Best regards,

                E.J.

                MagicMirror version: 2.30.0
                Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

                Test environment:
                MagicMirror version: v2.30.0
                Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

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

                  @evroom there is a documentation repo

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  evroomE 1 Reply Last reply Reply Quote 0
                  • evroomE Offline
                    evroom @sdetweil
                    last edited by

                    @sdetweil said in Cant use showEnd icloud cal:

                    @evroom there is a documentation repo

                    Found it:

                    https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues

                    MagicMirror version: 2.30.0
                    Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    Test environment:
                    MagicMirror version: v2.30.0
                    Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                    Raspbian GNU/Linux 12 (bookworm)

                    evroomE 1 Reply Last reply Reply Quote 0
                    • evroomE Offline
                      evroom @evroom
                      last edited by

                      @evroom said in Cant use showEnd icloud cal:

                      @sdetweil said in Cant use showEnd icloud cal:

                      @evroom there is a documentation repo

                      Found it:

                      https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues

                      Opened:
                      https://github.com/MagicMirrorOrg/MagicMirror-Documentation/issues/266

                      MagicMirror version: 2.30.0
                      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                      Raspbian GNU/Linux 12 (bookworm)

                      Test environment:
                      MagicMirror version: v2.30.0
                      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                      Raspbian GNU/Linux 12 (bookworm)

                      S 2 Replies Last reply Reply Quote 1
                      • S Offline
                        sdetweil @evroom
                        last edited by sdetweil

                        @evroom and thinking about it, i think i just messed up the implementation (Which was broken already)

                        showEnd:true

                        should show the end for all events fullday or not

                        showEndsOnlyWithDuration:true should NOT show the end for full day events but DO show end for others ( because of showEnd:true)

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • 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