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

Setting 2 default calendar modules; but weird represent

Scheduled Pinned Locked Moved Solved Troubleshooting
11 Posts 2 Posters 2.2k 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.
  • 1 Offline
    1a2a3a
    last edited by Dec 1, 2023, 3:34 PM

    hi all

    coming from this post - https://forum.magicmirror.builders/topic/18211/help-with-date-format-mmm-calendarext3/15?page=2

    what i am trying to achieve here is that im running cx3 and cx3agenda and default calendar module.

    i was able to change date format in cx3 and cx3agenda from mm d to d mm using locale.

    now the issue is that i am not able to change the date format in the default calendar.

    i have 2 default calendar running with 1 hidden -
    default cal 1 (hidden): with personal ics and soccer ics.
    default cal 2 (shown): with holiday ics.

    reason being is that i do not want my default calendar to show all 3 ics. i want the default cal to only show holiday ics. cx3 and cx3agenda will show all 3 ics.

    problem here is that for the 2 default calendar setup, despite changing the timeFormat to absolute and dateFormat to desire, it does not work.
    this will only work once i revert to 1 default calendar. but that would mean my default calendar will show all 3 ics instead of just 1.

    are there any options available?

    S 1 Reply Last reply Dec 1, 2023, 3:37 PM Reply Quote 0
    • S Away
      sdetweil @1a2a3a
      last edited by Dec 1, 2023, 4:46 PM

      @1a2a3a ok, got it…

      the code is using this attribute

       'fullDayEventDateFormat'
        fulldayEventDateFormat: "Do. MMM",
      

      you are suppling the second one

      case matters, every character

      so your config entry is ignored as it didn’t match, so it used the default

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 1 Reply Last reply Dec 1, 2023, 4:57 PM Reply Quote 0
      • S Away
        sdetweil @1a2a3a
        last edited by Dec 1, 2023, 3:37 PM

        @1a2a3a I don’t understand your words

        do u have 1 calendar module w 3 url entries
        or more than one calendar module w different settings?

        only the calendar module w a position: attribute will show the content

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 1 Reply Last reply Dec 1, 2023, 3:47 PM Reply Quote 0
        • 1 Offline
          1a2a3a @sdetweil
          last edited by sdetweil Dec 1, 2023, 4:15 PM Dec 1, 2023, 3:47 PM

          @sdetweil we are talking about default cal ya? lets ignore cx here.
          i have 1 hidden with 2 url. <- this is fine to be hidden because i need the url to be passed on to the cx.

          have another 1 not hidden with 1 url. <- i cant change the date format for this with the code given unless i merge both cal (hidden and not hidden) url into 1 module. i only want this calendar to only show holiday and not the rest of the url.

          im going to paste my code here

          {
            module: "MMM-CalendarExt3Agenda",
            position: "top_left",
            title: "Today",
              config: {
          	  locale: 'en-GB',
          	  instanceId: "basicCalendar",
          	  startDayIndex: 0,
          	  endDayIndex: 7,
          	  showMiniMonthCalendar: false,
          
            }
          },
          
          
          {
          			module: "calendar",
          			broadcastPastEvents: true,
          			config: {
          			timeFormat: "absolute",
          			dateFormat: "Do MMM",
          			calendars: [
          					{
          					 url: "personal.ics",
          					name: "123",
          					},
          					{
          					url: "personal2.ics",
          					},
          					{
          					url: "soccer.ics",
          					},
          
          ]
          }
          },
          
          
          {
          			 module: "MMM-CalendarExt3",
          			 position: "bottom_bar",
          			 title: "",
          			 config: {
          			  mode: "weekly",
          			  instanceId: "basicCalendar",
          			  locale: 'en-GB',
          			  weekIndex: 0,  
          			  weeksInView: 4,
          			  maxEventLines: 6,
          			  fontSize: '18px',
          			  eventHeight: '13px',
          			  firstDayOfWeek: 0,
                        		  useMarquee: true,
          			  calendarSet: [],
             }
          		},
          
          
          		{
          			module: "calendar",
          			broadcastPastEvents: true,
          			header: "Singapore Holiday",
          			position: "top_right",
          			config: {
          			timeFormat: "absolute",
          			dateFormat: "Do MMM",
          			fulldayEventDateFormat: "Do. MMM",
          			maximumEntries: 10,
          				calendars: [
          					{
          					url: "https://www.officeholidays.com/ics-clean/singapore",
          					name: "Singapore Holiday",
          					},
          
          

          …

          and this is my result. as you can see, managed to flip all the dates to d MM except the one on the right showing the holiday despite the code added in…

          mm.jpg

          S 2 Replies Last reply Dec 1, 2023, 4:19 PM Reply Quote 0
          • S Away
            sdetweil @1a2a3a
            last edited by Dec 1, 2023, 4:19 PM

            @1a2a3a I think you have the wrong format requested

            Do MMM

            from the moment format specs page
            https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/

            Day of Month	D	1 2 ... 30 31
            Do	1st 2nd ... 30th 31st
            DD	01 02 ... 30 31
            

            Do has th, nd,st…

            D has just the number

            DD has 2 digit number 0 prefixed

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 1 Reply Last reply Dec 1, 2023, 4:23 PM Reply Quote 0
            • S Away
              sdetweil @1a2a3a
              last edited by Dec 1, 2023, 4:21 PM

              @1a2a3a one other minor forum thing…
              alwasy warp config stuff in code block

              paste text in editor
              spare line above/below
              select all the text you pasted
              hit the </> button to wrap in code block… I added that for you this time

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 Offline
                1a2a3a @sdetweil
                last edited by Dec 1, 2023, 4:23 PM

                @sdetweil nothing works actually. so you see my code.
                the last paragraph on the default cal module where holiday ics is … no matter what format i choose for the date format, it will be stuck at Dec 25th. all i wanted is 25th Dec or 25 Dec.

                S 1 Reply Last reply Dec 1, 2023, 4:46 PM Reply Quote 0
                • S Away
                  sdetweil @1a2a3a
                  last edited by Dec 1, 2023, 4:46 PM

                  @1a2a3a ok, got it…

                  the code is using this attribute

                   'fullDayEventDateFormat'
                    fulldayEventDateFormat: "Do. MMM",
                  

                  you are suppling the second one

                  case matters, every character

                  so your config entry is ignored as it didn’t match, so it used the default

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 1 Reply Last reply Dec 1, 2023, 4:57 PM Reply Quote 0
                  • 1 Offline
                    1a2a3a @sdetweil
                    last edited by Dec 1, 2023, 4:57 PM

                    @sdetweil yes yes yes! thank you so much! spent my entire day on this :(

                    S 1 Reply Last reply Dec 1, 2023, 5:03 PM Reply Quote 0
                    • S Away
                      sdetweil @1a2a3a
                      last edited by Dec 1, 2023, 5:03 PM

                      @1a2a3a one of my modules ‘may’ help… doesn’t work for every module

                      see https://github.com/sdetweil/MMM-Config

                      it provides a form for you to fill out… no more config editing…

                      some modules do tricky things… EXT3/Agenda

                      but they can be augmented with a proper config definition and work perfectly.
                      I ship the schemas for modules that won’t be updated as a way to help older modules…

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 1 Reply Last reply Dec 1, 2023, 7:48 PM Reply Quote 0
                      • 1 Offline
                        1a2a3a @sdetweil
                        last edited by Dec 1, 2023, 7:48 PM

                        @sdetweil I actually installed this but couldn’t get it to work. When I tried launching, the page looks gibberish to me and it doesn’t generate a new config file. Not sure if I’m doing something wrong.

                        S 1 Reply Last reply Dec 1, 2023, 9:08 PM Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        1 / 2
                        • First post
                          1/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