I am working on a web app using the FullCalendar JQuery plugin to display the absence/presence of workers each day in a pany.
I need to display several types (or fields) of information in each day. For example, I would like to display for each day: a Title (ex. "John is absent"), and Percentage(ex, "95% assistance"). And I would like this percentage to appear with a different format, on the bottom right corner of each day's box.
As far as I've seen, the possible fields to describe an event are basically these ones:
events: [
{
title: 'John is sick',
start: '2013-11-19',
allDay: true
},
{
title: 'Mike is on vacation',
start: '2013-11-21',
end: '2013-11-26',
allDay: true
}
]
Is there any way to add more fields (like the porcentage of assistance) to a FullCalendar day?
Edit: thanks to Henrique C's answer I managed to do it. Just to plete a little more the answer I would like to add that besides, doing what Henrique said in his answer, it is also necessary to do something like this:
$('#calendar').fullCalendar({
events: [
{
title: 'My Event',
start: '2010-01-01',
description: 'This is a cool event'
}
// more events here
],
eventRender: function(event, element) {
element.qtip({
content: event.description
});
}
});
I am working on a web app using the FullCalendar JQuery plugin to display the absence/presence of workers each day in a pany.
I need to display several types (or fields) of information in each day. For example, I would like to display for each day: a Title (ex. "John is absent"), and Percentage(ex, "95% assistance"). And I would like this percentage to appear with a different format, on the bottom right corner of each day's box.
As far as I've seen, the possible fields to describe an event are basically these ones:
events: [
{
title: 'John is sick',
start: '2013-11-19',
allDay: true
},
{
title: 'Mike is on vacation',
start: '2013-11-21',
end: '2013-11-26',
allDay: true
}
]
Is there any way to add more fields (like the porcentage of assistance) to a FullCalendar day?
Edit: thanks to Henrique C's answer I managed to do it. Just to plete a little more the answer I would like to add that besides, doing what Henrique said in his answer, it is also necessary to do something like this:
$('#calendar').fullCalendar({
events: [
{
title: 'My Event',
start: '2010-01-01',
description: 'This is a cool event'
}
// more events here
],
eventRender: function(event, element) {
element.qtip({
content: event.description
});
}
});
Share Improve this question edited Nov 21, 2013 at 17:45 Xar asked Nov 19, 2013 at 11:49 XarXar 7,98020 gold badges61 silver badges92 bronze badges1 Answer
Reset to default 6Non-standard Fields This was taken from Fullcalendar website.
In addition to the fields above, you may also include your own non-standard fields in each Event Object. FullCalendar will not modify or delete these fields. For example, developers often include a description field for use in callbacks such as eventRender.
You can add any fields you want, fullcalendar will not change them.
events: [
{
title: 'John is sick',
start: '2013-11-19',
allDay: true,
description: 'Hurrayyyyyyyyyy',
myotherspecialfield: ':P'
},
{
title: 'Mike is on vacation',
start: '2013-11-21',
end: '2013-11-26',
allDay: true,
description: 'Hurrayyyyyyyyyy'
myotherspecialfield: ':P'
}
]