We finish fullcalendar

    Hello.

    On duty, it was necessary to highlight some days in fullcalendar color. I decided to finish it a little.
    What I did:
    In the parameters I added custom - a collection of days. For each day, you can stick a css class and a callback function that will be executed when you click.

      $('#calendar').fullCalendar({
          custom: [
            {
              start: new Date('2011', '12', '02'),    // дата
              cls: 'vacation',             // css класс
              callback: function(){ alert('works!'); } // функция по клику
            }
          ] });

    * This source code was highlighted with Source Code Highlighter.


    Maybe someone will be useful.
    See archive / demos / default.html

    PS Do not forget that new Date (..) The month must be specified starting from 0. i.e. January - 0. This can be misleading if you forget it.

    Download
    Demo

    Also popular now: