📜 ⬆️ ⬇️

Finish fullcalendar

Hello.

On duty, it took to highlight some days in fullcalendar color. I decided to finish it a little.
What did you do:
In the parameters added custom - collection of days. For each day, you can stick the css class and callback function, which 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 (..) Month must be specified starting from 0. i.e. January is 0. This can be misleading if you forget.

Download
Demo

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


All Articles