-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Prerequisites
- I am running the latest version of MagicMirror², and know that this feature is not available now.
- I know my issue is not related to a third-party module.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
I would like to customize the calendar so to apply specific CSS to events, via config.js, or via a module method, or notification.
Describe the Use Case
Say that I can add the class "past" to all past events, I could hide past events in the original calendar widget, but still have them rendered in the CalendarExt3 (which uses broadcasts from calendar module)
Describe Preferred Solution
config.js
....calendars: [
{
name : "my_calendar"
url: "...",
cssClasses : {
past : "e.startDate < new Date()"
}
}
}
using a module method:
MM.getModules().find(m=>m.name=="calendar").setStyleCallback(event=>{
var classes = {}
classes.past = event.startDate < new Date()
return classes
})
using a module motification:
myModule.sendNotification("calendar_setStyleCallback", {callback : event=>{
var classes = {}
classes.past = event.startDate < new Date()
return classes
}})
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
Participation
- I am willing to submit a pull request for this change.
Reactions are currently unavailable