Custom "event"-object

Hi,

Instead of using the vanilla event-object I’d like to use my own appointment-object together with the schedule - Is this possible and how would I go about doing it? My own attempts doesn’t seem to work as nothing is showing in the schedule (see attached image)

/Regards Kristofer


Just to clarify, in the above image “item” is my appointment-object and this is how it looks like:

[code]export interface IAppointment {
id: number;
resource: IResource;
service: IService;
customer: ICustomer;
location: ILocation;
text: string;
description: string;
startTime: Date;
endTime: Date;
}

export class Appointment implements IAppointment {
    id = 0;
    resource = new Resource();
    service = new Service();
    customer = new Customer();
    location = new Location();
    text = "";
    description = "";
    startTime: Date;
    endTime: Date;
}[/code]

The event object has two mandatory fields, start_date and end_date. The scheduler will use those fields for many operations, and there is no way to use a different set of fields for storing start and end dates.

Except of those two mandatory fields, event model can have any set of custom fields.

Hi and thanks for your reply,

regarding these mandatory field: Yes I gathered as much and as you can see in my example I’ve included all the required fields but it still won’t show up in the schedule. :confused:

Attaching another runtime-snapshot showing that my events (appointments) gets added to the internal _events-collection.


I’m officially stumped, there must be something that I’m missing but I can’t figure out what it is. Do I have to use some particular Date-type or do I have the wrong order of things? It just seems that it should be working the way I do as the events are clearly being added to the scheduler and yet it stays emty in the view. :frowning:


NVM, I’m an idiot… -.-’