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.

    Calendar Event Display start and end date

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 1.1k 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
      pastormingle
      last edited by

      Re: How to display start and end times/dates of events in calendarI’ve not been able to set all-day events to display start and end dates. Any guidance here?

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

        @pastormingle eh,???

        Sam

        How to add modules

        learning how to use browser developers window for css changes

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

          @pastormingle there is a bug

          edit
          modules/default/calendar/calendar.js

          						timeWrapper.innerHTML += this.capFirst(moment(event.endDate, "x").format(this.config.dateEndFormat));
          					} else    // <---- add this else, line 338
          					// For full day events we use the fullDayEventDateFormat
          					if (event.fullDayEvent) {
          

          config options

          showEnd: true
          timeFormat: “absolute”

          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
            pastormingle @sdetweil
            last edited by

            @sdetweil Don’t think i am doing this right as it’s not loading the calendar.js file now… Do I just copy this to the bottom of the file the same it?

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

              @pastormingle now. you add the word ‘else’

              to the line I documented.

              what do u mean not loading?

              did u edit that file like the other one I had u correct?

              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
                pastormingle @sdetweil
                last edited by

                @sdetweil if (this.config.timeFormat === “absolute”) {
                // Use dateFormat
                timeWrapper.innerHTML = this.capFirst(moment(event.startDate, “x”).format(this.config.dateFormat));
                // Add end time if showEnd
                if (this.config.showEnd) {
                timeWrapper.innerHTML += “-”;
                timeWrapper.innerHTML += this.capFirst(moment(event.endDate, “x”).format(this.config.dateEndFormat));
                }
                // For full day events we use the fullDayEventDateFormat
                if (event.fullDayEvent) {
                //subtract one second so that fullDayEvents end at 23:59:59, and not at 0:00:00 one the next day
                event.endDate -= oneSecond;
                timeWrapper.innerHTML = this.capFirst(moment(event.startDate, “x”).format(this.config.fullDayEventDateFormat));
                }

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

                  @pastormingle eh,???

                  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
                    pastormingle @sdetweil
                    last edited by

                    @sdetweil Ok i think i got it now…
                    if (this.config.showEnd) {
                    timeWrapper.innerHTML += “-”;
                    timeWrapper.innerHTML += this.capFirst(moment(event.endDate, “x”).format(this.config.dateEndFormat));
                    } else
                    // For full day events we use the fullDayEventDateFormat
                    if (event.fullDayEvent) {

                    1 Reply Last reply Reply Quote 1
                    • 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