0

i have been trying to change the color of my event with no success.

my git-ripo is https://github.com/mzararagoza/rails-fullcalendar-icecube and there is a sample of the site.

i am loading my event on with json that looks like http://rails-fullcalendar-icecube.herokuapp.com/event_instances.json

{

    "_routes": null,
    "title": "ddd",
    "color": "#b319ab",
    "url": "/events/6",
    "start": "2013-06-12T00:00:00-05:00",
    "end": "2013-06-12T23:59:59-05:00",
    "allDay": true,
    "event_id": 6

}

Thanks for all the help

MZaragoza
  • 10,108
  • 9
  • 71
  • 116

2 Answers2

1

Try assigning a classname to it and define that class inside a CSS block of code, just like this one:

<style>    
.myCalendarEvent{
            color:#000;
            background-color:#FFF;
            border-color:#669999;   
            width: 100%;                
        }
</style>
aloplop85
  • 892
  • 3
  • 16
  • 40
0

To change the color for all events, the recommanded way is to use fullCalendar's API:

$('#calendar').fullCalendar({
  eventColor: '#yourcolor'
});

To change a specific event's color knowing it's id:

event = $('#full-calendar').fullCalendar('clientEvents', event_id)
event.color = '#yourcolor'
$('#full-calendar').fullCalendar('updateEvent', event)
fkoessler
  • 6,932
  • 11
  • 60
  • 92