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

A module that changes the text color of a Calender when the next event happens in a certain amount of time.

Scheduled Pinned Locked Moved Unsolved Feature Requests
11 Posts 2 Posters 2.9k 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.
  • ? Offline
    A Former User @MerlijnAlmer
    last edited by Sep 23, 2019, 8:30 AM

    @MerlijnAlmer

    Like this?
    0_1569227265077_94237994-4388-41fd-9bf7-18aea7d35bcb-image.png
    MMM-CalendarExt2 has transform feature so a user can change attributes of events by conditions. Above example shows the transforming of icon and class of events.

    ...
              {
                name: "VIEW3",
                mode: "upcoming",
                position:"top_center",
                transform:(event) => {
                  if (event.startDate < ((Date.now()/1000 + 60*60*4))) {
                    event.className = "urgent"
                    event.icon = "flat-color-icons:alarm-clock"
                    event.title = "[URGENT] " + event.title
                  }
                  return event
                }
              },
    ...
    
    1 Reply Last reply Reply Quote 0
    • M Offline
      MerlijnAlmer
      last edited by MerlijnAlmer Sep 23, 2019, 10:04 AM Sep 23, 2019, 10:04 AM

      yes thank you @Sean thats exactly what i mean.

      ~M

      1 Reply Last reply Reply Quote 0
      • M Offline
        MerlijnAlmer
        last edited by Sep 23, 2019, 10:07 AM

        @Sean you wouldn’t happen to know a way to have the description of a event be displayed instead of the organizer?

        I am using the magic mirror framework for a roommanagement system for the company i work for and they use a Office calendar to manage the room but now it shows who reserved the room and not the reason why.

        ? 1 Reply Last reply Sep 23, 2019, 10:45 AM Reply Quote 0
        • ? Offline
          A Former User @MerlijnAlmer
          last edited by Sep 23, 2019, 10:45 AM

          @MerlijnAlmer
          Do you mean showing Description or Location of event?
          0_1569235515752_4febf88f-bfbb-4913-bf8b-149dd78ae0c7-image.png

          1 Reply Last reply Reply Quote 0
          • M Offline
            MerlijnAlmer
            last edited by Sep 23, 2019, 10:48 AM

            yes just showing the discrition of a event.

            they make an event for that day and in the description part they fill in what they need the room for.
            so instead of seeing thier names on the screen they would like to see the description.
            location is not needed seen as the screens are at the room.

            thanks for all your help BTW.

            ~M

            ? 1 Reply Last reply Sep 23, 2019, 10:53 AM Reply Quote 0
            • ? Offline
              A Former User @MerlijnAlmer
              last edited by Sep 23, 2019, 10:53 AM

              @MerlijnAlmer
              If you are using MMM-CalendarExt2, you can transform title of an event by replacing with description field of event.
              0_1569235896047_6b16e36a-ae34-45b5-b861-0d15007aebfa-image.png

              views: [
                ...
                {
                  name: "VIEW3",
                  mode: "upcoming",
                  position:"top_center",
                  transform:(event) => {
                    event.title = event.description
                    if (event.startDate < ((Date.now()/1000 + 60*15))) {
                      event.className = "urgent"
                      event.icon = "flat-color-icons:alarm-clock"
                    }
                    return event
                  }
                },
                ...
              ]
              

              :D

              1 Reply Last reply Reply Quote 0
              • M Offline
                MerlijnAlmer
                last edited by Sep 23, 2019, 10:54 AM

                okay i was just in the process of taking the screen apart to use calendarExt2 thank you for your quick and usefull help.

                ~M

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MerlijnAlmer
                  last edited by Sep 24, 2019, 1:26 PM

                  @Sean i might seem to be a absolute knob head for you but when i put the codes in my .js file it breaks the file.
                  or is the code supposed to go in to the .css file?

                  ? 1 Reply Last reply Sep 24, 2019, 1:27 PM Reply Quote 0
                  • ? Offline
                    A Former User @MerlijnAlmer
                    last edited by Sep 24, 2019, 1:27 PM

                    @MerlijnAlmer
                    show me your configuration. eouia0819@gmail.com

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      MerlijnAlmer
                      last edited by Sep 24, 2019, 1:32 PM

                      @sean i sent it

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