This is a migrated thread and some comments may be shown as answers.

Scheduler Not Showing Tasks

1 Answer 142 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 01 Nov 2016, 01:12 PM

I have configured a scheduler control, see below, to read tasks from a rest service. However, nothing is displayed within the scheduler. If I take the raw JSON from the rest services response and put it directly into the configuration it will display within the scheduler. Below is the configuration:

$('#scheduler').kendoScheduler({

      date: new Date('2016/10/31'),
      startTime: new Date('2016/10/31 12:00 am'),
      dataSource: {
        batch: true,
        transport: {
          read: {
            url: 'http://localhost:52089/api/v1/calendar/events',
            dataType: 'json'
          }
        },
        //data: [{"id":1,"dossierCustomerId":"1234ABCD","start":"2016-10-31T12:00:00Z","timeZone":null,"end":"2016-10-31T16:00:00Z","title":"Test Event","description":"This is a test event created by Frank.","ownerId":1,"isAllDay":false,"recurrenceRule":null,"recurrenceException":null,"eventResources":[]}],
        schema: {
          model: {
              id: 'id',
              fields: {
                  //taskID: { from: 'id', type: 'number' },
                  title: { from: 'title', defaultValue: 'No title', validation: { required: true } },
                  start: { type: 'date', from: 'start' },
                  end: { type: 'date', from: 'end' },
                  description: { from: 'description' },
                  ownerId: { from: 'ownerId', defaultValue: 1 },
                  isAllDay: { type: 'boolean', from: 'isAllDay' }
              }
            }
        }
      }
    });

The JSON returned from the service:

[{"id":1,"dossierCustomerId":"1234ABCD","start":"2016-10-31T12:00:00Z","timeZone":null,"end":"2016-10-31T16:00:00Z","title":"Test Event","description":"This is a test event created by Frank.","ownerId":1,"isAllDay":false,"recurrenceRule":null,"recurrenceException":null}]

 

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 02 Nov 2016, 02:03 PM
Never mind I solved the issue. It was a CORS issue.
Tags
Scheduler
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Share this question
or