Read the statement by Michael Teeuw here.
Setting 2 default calendar modules; but weird represent
-
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?
-
@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
-
@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
-
@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…
-
@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
-
@1a2a3a one other minor forum thing…
alwasy warp config stuff in code blockpaste 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 -
@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. -
@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
-
@sdetweil yes yes yes! thank you so much! spent my entire day on this :(
-
@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… -
@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.