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.

    Change the color of the calendar line for the TODAY event.

    Scheduled Pinned Locked Moved System
    5 Posts 3 Posters 1.5k 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.
    • L Offline
      Laz
      last edited by

      Good afternoon. Standard CALENDAR module.
      I made a color setting by keywords (Birthday, Memorial Day…). But I would like when the event comes (written TODAY in the calendar), so that it is this event that changes the color to another (specify the color in the settings).

      c0a3a3d7-fae7-4d14-abd7-b441e0588aab-image.png

      e0b495d5-5b64-4c8e-9eb7-72b2574853b9-image.png

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

        @Laz we only have custom event style by text in the event.

        css does not provide a selector for text contents of an element,(:has only works on elements relative to an element), so there is no reliable way to override the standard styling

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • L Offline
          Laz
          last edited by

          Perhaps you did not understand me…)
          I want the event that today (the top line of the list of events) to be yellow, the rest pink (as in the screenshot). Only the event TODAY turned yellow.

          2ba492fd-c316-491e-af2a-2050c08325fa-image.png

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

            @Laz I understood exactly what you want.

            mm calendar provides a way (customEvents) to stylize based on the words on the event subject.

            TODAY is a word provided by the code to document the TIME of the event.

            unfortunately the customEvents function does not see that value.

            given that you can’t do it directly with mm config, the only other choice would be to use some style sheet operation (css).

            while you can (css) select a first element, or last, or nth, you cannot select an element based on it’s text content. so you cannot find the entry that says TODAY

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            BKeyportB 1 Reply Last reply Reply Quote 0
            • BKeyportB Offline
              BKeyport Module Developer @sdetweil
              last edited by

              @sdetweil The other option is to use an alternative calendar display module, like MMM-CalendarExt3Agenda which is designed for a literal billion CSS options.

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

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