Is it possible to use a json source for resources?
Adding resources to the json example returns an error. See code below
// prepare the data
var source =
{
dataType: 'json',
dataFields: [
{ name: 'id', type: 'string' },
{ name: 'status', type: 'string' },
{ name: 'about', type: 'string' },
{ name: 'address', type: 'string' },
{ name: 'company', type: 'string'},
{ name: 'name', type: 'string' },
{ name: 'style', type: 'string' },
{ name: 'calendar', type: 'string' },
{ name: 'start', type: 'date', format: "yyyy-MM-dd HH:mm" },
{ name: 'end', type: 'date', format: "yyyy-MM-dd HH:mm" }
],
id: 'id',
url: '../sampledata/appointments.txt'
};
var adapter = new $.jqx.dataAdapter(source);
$("#scheduler").jqxScheduler({
date: new $.jqx.date(2015, 11, 23),
width: 850,
height: 600,
source: adapter,
showLegend: true,
ready: function () {
},
resources: {
colorScheme: "scheme02",
dataField: "calendar",
source: new $.jqx.dataAdapter(source)
},
appointmentDataFields:
{
from: "start",
to: "end",
id: "id",
description: "about",
location: "address",
subject: "name",
style: "style",
status: "status"
},
view: 'weekView',
views:
[
'dayView',
'weekView',
'monthView'
]
});
});