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.

    MMM-CalendarExt2 - I want to change the first day of the week, but weekStart setting is not having an effect

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 2 Posters 23 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.
    • eprostkoE Offline
      eprostko
      last edited by

      For the last few weeks, my calendar weeks have been starting on Monday, rather than Sunday (I’m in the US). It used to show Sun-Sat, but now it’s Mon-Sun.

      I found the weekStart: 0 setting, but it’s not having any effect.
      I set the locale: en-US.
      I tried setting the mode: “week” and type: “row” and weekStart: 0 or 3 or 5 just to see what it would do, and it had no effect.
      I set type: “weekly” and it did change the first day to Sunday, each week was a column, not a row.

      The blocks from my config are below. Can anyone help?

      {
      module: ‘MMM-CalendarExt2’,
      config: {
      locale: “en-US”,
      weekStart: 0,
      calendars: [

      Under views, here’s what I have
      views: [
      {
      position: “top_bar”,
      mode: “week”,
      type: “row”,
      slotMaxHeight: “150px”,
      slotCount: 3,
      hideOverflow: false,
      slotTitle: “”,
      slotTitleFormat: “dddd, M/D”,
      timeFormat: “h:mm”,
      slotSubTitle: " ",
      modeOptions: {
      weekStart: 0, // Sunday-first
      },
      },

      KristjanESPERANTOK 2 Replies Last reply Reply Quote 0
      • KristjanESPERANTOK Offline
        KristjanESPERANTO Module Developer @eprostko
        last edited by

        @eprostko The issue is that modeOptions is not a valid configuration field in MMM-CalenderExt2. Where did you get that?

        weekStart needs to be set directly inside the view object:

        views: [
          {
            position: "top_bar",
            mode: "week",
            type: "row",
            weekStart: 0,        // ← here, at the top level of the view
            slotMaxHeight: "150px",
            slotCount: 3,
            // ...
          }
        ]
        

        The top-level weekStart: 0 in your config has no effect either - there’s no such top-level option, only the per-view (or defaultSet.view) one.

        1 Reply Last reply Reply Quote 0
        • KristjanESPERANTOK Offline
          KristjanESPERANTO Module Developer @eprostko
          last edited by KristjanESPERANTO

          @eprostko And it would be great if you could format your code snippets a bit more clearly in the future like proper indentation and quotation marks. The way you wrote the config part is really hard to read and analyze 🙂

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • 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