Can I style the event's container cell instead of the event with the fullcalendar? -
one of custom properties of events typeid
.
what i'd show entire container cells in different colors depending on typeid
of event is. instance, i'd cells contain event of typeid = 1
have background color of blue, , cells contain event of typeid = 2
have background color of green.
i know can change cell's styles in dayrender
callback, can access event associated each cell @ point?
i had similar issue. can cell of event container in eventrender callback - this:
eventrender: function(event, element, view) { var cell = view.datetocell(event.start); var eventcontainer = view.element.find('tr:eq(' + (cell.row + 1) + ') td:eq(' + cell.col + ')'); //or if similar var datestring = $.fullcalendar.formatdate(event.start, 'yyyy-mm-dd'); var eventcontainer = view.element.find('.fc-day[data-date="' + datestring + '"]'); eventcontainer.css('background-color', 'red'); },
Comments
Post a Comment