I'm using jquery FullCalendar agendaWeek view (no other views).
http://fullcalendar.io/views/agendaWeek/
I will implement 3 eventSources (each one with a different background color).
All events will be backgroundEvents.
http://fullcalendar.io/docs/event_rendering/Background_Events/
Summary: I want to implement a standard Week Timetable with 1h timeslots, green background if the hour is available and red if it is not available.
Extremely simple.
Problem 1: I would like to set a green background to all the available timeslots (= timeslots with no events).
Problem 2: I would like to set a default "Foo" text inside every available timeslot.
Here is the code:
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultDate: '2015-02-12',
slotDuration: '00:60:00',
minTime: "08:00:00",
maxTime: "22:00:00",
defaultView: 'agendaWeek',
lang: "it",
height: "auto",
allDaySlot: false,
axisFormat: 'H:mm',
editable: true,
events: [
{
id: 'Meeting1',
start: '2015-02-11T10:00:00',
end: '2015-02-11T11:00:00',
rendering: 'background',
backgroundColor: 'red'
},
{
id: 'Meeting2',
start: '2015-02-13T15:00:00',
end: '2015-02-13T16:00:00',
rendering: 'background',
color: 'red'
},
]
});
Please note that (as stated above), in the real project the events data will derive from 3 ajax sources... but (for the purpose of this specific question) in the code above are passed as an array.