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
    5 Posts 2 Posters 40 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 1
        • 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 🙂

          eprostkoE 1 Reply Last reply Reply Quote 1
          • eprostkoE Offline
            eprostko @KristjanESPERANTO
            last edited by

            @KristjanESPERANTO Thank you so much! That worked. I thought I tried it that way in one of my many attempts, but clearly I didn’t.

            Where did that modeOptions thing come from? ChatGPT. It gave me quite a few wrong answers. Some days I have great luck with it and other days I do not.

            And I will be sure to format my config the next time I need some help. Thanks for pointing that out.

            Again, thanks for the help, and have a wonderful day!

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

              @eprostko I’m glad it’s working. The configuration of MMM-CalendarExt2 and the documentation are quite complex, so I completely understand if you’re having a hard time with it.

              Have fun with your project 😃

              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