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

"Today" on default calendar module

Scheduled Pinned Locked Moved Custom CSS
6 Posts 2 Posters 2.5k 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.
  • R Offline
    rob73
    last edited by Jan 16, 2019, 6:54 AM

    Is there anyway that I can remove the “Today” and “at” whatever time an event is on the calendar? I only show events for the current day. I am not so busy that I need to display the event time from the calendar. After each event it says “Today at 5:30 PM”, or whatever time the event has from google calendar. I would only like to display the events. Is there a way to edit out the rest? I have two mirrors setup and I thought i edited the “Today” out of the calendar.js file, but now its back. It would just show 5:30 event time and not the Today. If the calendar event is an all day event, it wont show the time anyway, just the “Today”. Its still edited out of the calendar.js file, but it displays it anyway. I have searched all through the configs and I just dont understand it enough to figure it out. If someone could point me in the right direction where to look, I would appreciate it greatly.

    There is just so much potential here, but I am limited alot because I just cant wrap my head around this node.js stuff…

    Rob

    1 Reply Last reply Reply Quote 0
    • B Offline
      BKeyport Module Developer
      last edited by BKeyport Jan 16, 2019, 10:12 AM Jan 16, 2019, 10:10 AM

      I’d use this in my config.js for the calendar module’s config:

      dateFormat: "h:mm a", //  This sets the string to time only
      timeFormat: "absolute", // only shows times normally. 
      getRelative: 0, // lowers the limit for absolute time to zero - no relative. 
      urgency: 0, // makes sure it stays absolute.
      

      I do believe that changing the dateFormat to “H:mm” will go 24 hour.

      The "E" in "Javascript" stands for "Easy"

      R 1 Reply Last reply Jan 16, 2019, 5:28 PM Reply Quote 0
      • R Offline
        rob73 @BKeyport
        last edited by Jan 16, 2019, 5:28 PM

        @bkeyport , Thanks for working with me here…

        I added that to my config. It didnt change the display any. Other than the calendar url, the only options i have in my config are maximumEntries: “4” & maximumNumberOfDays: “1”. Making your modification had no affect on the display. I tried it on two different mirrors with the same result. I will try it with an event with a given time and see if it has an affect on that…

        Rob

        1 Reply Last reply Reply Quote 0
        • B Offline
          BKeyport Module Developer
          last edited by Jan 17, 2019, 4:20 AM

          odd… Here’s how I have mine configured, and it clearly changes things

          {
          			module: "calendar",
          			position: "top_right",
          			config: {
          				maximumEntries: 15,
          				maximumNumberOfDays: 90,
          				displaySymbol: false,
          				maxTitleLength: 30,
          				wrapEvents: true,
          				fetchInterval: 120000,
          				fade: false,
          				dateFormat: "M/D h:mm a",
          				fullDateEventDateFormat: "M/D",
          				timeFormat: "absolute",
          				getRelative: 0,
          				urgency: 0,
          				broadcastEvents: false,
          				hideOngoing: true,
          				excludedEvents: ["InOffice"],
          				dateEndFormat: "h:mm a",
          				calendars: [
          					{
          						symbol: "calendar",
          						url: "https://url", 
          					}
          					],
          				}
          		},
          

          The "E" in "Javascript" stands for "Easy"

          R 1 Reply Last reply Jan 17, 2019, 4:09 PM Reply Quote 0
          • R Offline
            rob73 @BKeyport
            last edited by Jan 17, 2019, 4:09 PM

            @bkeyport , I will give that a try and get back with you…

            1 Reply Last reply Reply Quote 0
            • R Offline
              rob73
              last edited by rob73 Jan 17, 2019, 4:58 PM Jan 17, 2019, 4:56 PM

              @bkeyport, I modified my config with your config and it removed the Today, just as I was looking for! Thank you for your help. I think where my problem may have been is instead of having all of the config options above the calendars section, right after the config braces, I had all of my options below the url line in the calendars section…

              When I saw your config layout, I was immediately suspicious of my config layout being the culprit…

              I had one mirror that was still displaying Today even though I edited the config just like the other one that was not displaying it… I ended up having to edit line 279 in the calendar.js file & removing the text “Today” from "timeWrapper.innerHTML = this.capFirst(this.translate("Today “));”

              That together does the trick! I thank you for your help!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                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