First of all i would like to suggest you the
User Manual[
^] for Resource-Calender.
Now
Resources :: Introduces available resources to calendar. Resource id links to Event objects resource property. Event objects resource can be also an array! This is a basic JSON-array which includes resource name and id. It can also include readonly boolean which sets resource readonly.
For example:
resources: [
{
name: 'Resource 2',
id: 'resource2'
},
{
name: 'Resource 1',
id: 'resource1',
readonly: true
}
],
events: [
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2),
resource: 'resource1'
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false,
resource: ['resource4','resource2']
}
],
You can also insert a URL in the resources option (like in events):
resources: 'http://hostname/jsonresources.php'
Weekend headers in different color? :: You can use class fc-weekend to affect to weekend headers and fc-weekend-column for weekend columns for example background color.
A VERY simple way to pass multiple resources to FullCalendar with PHP
$resources = array(
array("name" => "Resource 1", id => "resource1"),
array("name" => "Resource 2", id => "resource2")
);
$resources_JSON_array = json_encode($resources);
resources: $resources_JSON_array,
A VERY simple way to pass multiple resources to FullCalendar with jQuery ajax
resources: 'getResources.php',
$resources = array(
array("name" => "Resource 1", id => "resource1"),
array("name" => "Resource 2", id => "resource2")
);
echo json_encode($resources);
External events and resources example:
When using external events, you can get resource data this way:
drop: function(date, allDay, ev, ui, resource) {
var resourceId = resource.id;
var resourceName = resource.name
}
and still if your not getting it then please
Visit This Link.[
^] Download the sample code and try your variation solution.