Skip to content

(feature) calendar display options - #4348

Open
dberntsson wants to merge 3 commits into
MagicMirrorOrg:developfrom
dberntsson:feat/calendar-display-options
Open

dberntsson wants to merge 3 commits into
MagicMirrorOrg:developfrom
dberntsson:feat/calendar-display-options

Conversation

@dberntsson

Copy link
Copy Markdown

Hello and thank you for wanting to contribute to the MagicMirror² project!

Please make sure that you have followed these 3 rules before submitting your Pull Request:

  1. Base your pull requests against the develop branch.
    Yes
  1. Include these infos in the description:
  • Does the pull request solve a related issue?
    No
  • What does the pull request accomplish? Use a list if needed.
    This pull request adds calendar display options so users can choose whether event dates and times appear in the calendar.
  • Adds displayEventDate and displayEventTime configuration options, both enabled by default.
  • Applies the options in absolute, relative, and date-header display modes, including multi-day all-day events.
  • Documents the new options and adds E2E coverage for the display combinations.
  • Updates the E2E setup so its dynamic app import works with Windows paths.
  • If it includes major visual changes please add screenshots.
    No
  1. Please run node --run lint:fix before submitting so that style issues are fixed.
    Yes

Note: Sometimes the development moves very fast. It is highly
recommended that you update your branch of develop before creating a
pull request to send us your changes. This makes everyone's lives
easier (including yours) and helps us out on the development team.

Thanks again and have a nice day!

@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

Thanks for the PR! I can roughly see what you’re trying to achieve. But could you please describe your specific use case? Before/after screenshots may also be helpful.

@dberntsson

dberntsson commented Nov 18, 2026 •

Copy link
Copy Markdown
Author

Thanks for the feedback and the request of making the PR more motivated/understandable.

My use-case is that I have a calendar of full day events like theme days, holidays and flag days.
I have todays events in position:top_center with the following configuration:

  {
    module: "calendar",
    position: "top_center", // This can be any of the regions. Best results in left or right regions.
    config: {
      maximumNumberOfDays: 1,
      broadcastPastEvents: true,
      maxTitleLength: 50,
      timeFormat: "absolute",
      showEnd: false,
      displaySymbol: false,
      calendars: [
        {
          url: "https://blabla.com/bla.ics",
        },
      ],
    },

That gives me a screen like this:
image

I don't want the date to be presented, since I know it's todays events only.
My only workaround in the current production code is adding the collowing configuration:

      fullDayEventDateFormat: "[ ]",

which will change the dateformatter into something that won't be presented
image

I thought some new show*-configuration was a lot better and clearer, also having the capability to separate date from time.

So I have a narrow use-case (timeFormat:absolute & maximumNumberOfDays:1) with a already existing "workaround" for fullDayEvents but I think the feature can be used in other use-cases aswell.

@samdev510

samdev510 commented Nov 18, 2026 •

Copy link
Copy Markdown

I think you would just use CSS to display:none; on the date column for that calendar instance, no config

.calendar .time.light {
        display: none;
}

there are multiple ways to select the calendar instance, not ALL

use the module_x_name selector module: entries from top of config.js , start with 0
in my test env, calendar is the 8th module: entry , so x is 7
pound sign on a css selector means id=, . means class, empty/no prefix means tag name (img, div, table...)

#module_7_calendar  .time.light {
        display: none;
}

or you can add an arbitrary string to the classes:"........." space separated list of string, this assigns that string in the class="..." on the module entry, and then you can use it to target(select) those elements

classes:"foo",
.foo  .time.light {
        display: none;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants