With current version of FullCalendar is it possible to use annotations as mentioned in this link? See in this fiddle, that is not working, like this:
$(document).ready(function() {
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: true,
annotations: [{
start: new Date(y, m, d-2, 13, 30),
end: new Date(y, m, d-2, 14, 00),
title: 'Blocked Day',
cls: 'open',
color: '#777777',
background: '#000'
}],
events: [{
title: 'Birthday Party',
start: new Date(y, m, d+1, 19, 0),
end: new Date(y, m, d+1, 22, 30),
allDay: false
}]
});
});
On the example you have submitted you have set your script executing on the load event
$(window).load(function() {
//your code
});
Take a look at the upper left corner of JsFiddle, either you have to set the fiddle running on document ready event and remove the unnecessary wrapping of $(document).ready() or just wrap your code in the <head> of your document.
Take a look at your update fiddle http://jsfiddle.net/Ppnw3/1/ as well as the full demo provided in github
http://jsfiddle.net/Ppnw3/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With