I see in the documentation (https://docs.mobiscroll.com/jquery/eventcalendar#opt-data) that I can set the following properties using json for a schedule event:
d Date, String, Object - Defines the date of the event.
start Date, String, Object - Specifies the start of the event.
end Date, String, Object - Specifies the end of the event.
text String - The title of the event.
color String - The color of the event.
allDay Boolean - Specifies if the event is all day or not.
But it doesn’t say anything about setting the text colour, yet in your demo (https://demo.mobiscroll.com/jquery/eventcalendar/switching-day-week-month-view#themeVariant=light&theme=material) the text colour is coming back white. How can I do that?
If you want to set the text color for schedule events, you need to use css styling. You can check the text class of the events as shown in the attached image.
For the modification you need to override this CSS rule:
Hm… that’s unfortunate as the users will have the ability to choose their own event colours so depending on what colour they choose I will need the text colour to be either black or white. I can calculate it on a per event basis on the server side but if I have to set it via css then I don’t see how I’m going to do that.
You can do this by giving the text not only a title, but also an element that you can customize. Similar to this code:
text: '<span style="color:white">Title</span>'