tags:

views:

21

answers:

1

I would like to change the color of the past events, I guess I need to add a class to them but that is the problem, how I do that?

A: 

I did it (hard coding):

  1. Before rendering:

    var hoy = new Date;// get today's date

    hoy = parseInt((hoy.getTime()) / 1000); //get today date in unix

  2. When creating the html, inside the "for":

    unixevent = parseInt((event.end.getTime()) / 1000) //event date in Unix

    if (unixevent < hoy) {className += 'fc-passed ';} //add class if event is old

  3. Add a new "fc-passed" class in the css file.

medinauta