How to change specefic background color in jQuery FullCalendar

How to change the background color of an event when rendering events in a calendar. How can I change the background color of a specific event in javascript, I assigned an event with an identifier.

+4
source share
2 answers

you can change the values โ€‹โ€‹of " fc-event " in fullcalendar.css to change the background of the default event,

or you can add a new css class as follows:

 .newtype, .fc-agenda .newtype.fc-event-time, .newtype a { border-style: solid; border-color: #6da; /* default BORDER color (probably the same as background-color) */ background-color: #6da; /* #36c; default BACKGROUND color */ color: #fff; /* default TEXT color */ } 

and specify this event through tt className :

 event.className="newtype"; 

ps you need to get the event object by the function .fullCalendar( 'clientEvents', event_id) first

Good luck.

+1
source

make sure the event has a specific "class name" and then color it through css. more details here: http://arshaw.com/fullcalendar/docs/event_rendering/Colors/

+1
source

Source: https://habr.com/ru/post/1333493/


All Articles