@MMRIZE Apologies for the delayed reply, i have been busy and then couldn’t log in to the forum.
I have tried updating, installing, and reinstalling. then adding the code into my config file but i still can’t get it to correct. I think i put the code in correctly but i have attached that so you can check. my config file isn’t throwing up any errors?
how do i check what version of CX3 i am running? i did delete the whole folder and redo the git pull/install so i should have whatever is on github?
{
module: "MMM-CalendarExt3",
position: "bottom_bar",
title: "",
config: {
mode: "week", //week or month view
weeksInView: 5,
weekIndex: 0, //-1 start last week, 0 this week, 1 next week.
instanceId: "basicCalendar",
locale: 'en-GB',
maxEventLines: 4,
firstDayOfWeek: 1,
useWeather: true,
weatherLocationName: 'xxxx',
eventPayload: (payload) => {
for (let ev of payload) {
if (ev.fullDayEvent) {
let gap = +ev.endDate - +ev.startDate
if (gap % (1000 * 60 * 60 * 24) === 0) {
ev.startDate = new Date(+ev.startDate).setHours(0, 0, 0, 0)
ev.endDate = new Date(+ev.startDate + gap).setMilliseconds(-1)
}
}
}
return payload
},
eventTransformer: (e) => {
e.startDate = new Date(e.start?.date || e.start?.dateTime).valueOf()
e.endDate = new Date(e.end?.date || e.end?.dateTime).valueOf()
e.title = e.summary
e.fullDayEvent = (e.start?.date) ? true : false
//return e
if (e.title.search('Lates') > -1) e.color = 'mediumvioletred'
if (e.title.search('Earlies') > -1) e.color = 'yellow'
if (e.title.search('12 hours') > -1) e.color = 'blue'
if (e.title.search('12 Hours') > -1) e.color = 'blue'
if (e.title.search('12 hrs') > -1) e.color = 'blue'
if (e.title.search('Vacation') > -1) e.color = 'blue'
if (e.title.search('vacation') > -1) e.color = 'blue'
if (e.title.search('Shutdown') > -1) e.color = 'goldenrod'
if (e.title.search('My weekend') > -1) e.color = 'deepskyblue'
return e
}
}
},