A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
Read the statement by Michael Teeuw here.
MMM-Calendarext3 eventTransformer
-
So, I’ve copied the code, but wondering how to add more than 1 event title / colour combination, eg John = Blue for the example below, but how would I get John=Blue, Steve=Green, Sandra=Orange, I’ve tried copying and having a separate line for each, but that results in none of the events having colours.
eventTransformer: (ev) => {
if (ev.title.search(‘John’) > -1) ev.color = ‘blue’
return ev
} -
-
@sdetweil Legend!
-
@bicolorbore586 after u get above three if/else, in my opinion it’s better to use a switch/case clause