New to Kendo UI for jQueryStart a free 30-day trial

Define

methods

Defines a new SchedulerEvent type using the provided options.

Parameters:optionsObject

Describes the configuration options of the new scheduler event class.

options.idString

The name of the field which acts as an identifier of the scheduler event. The identifier is used to determine if a model instance is new or existing one. If the value of the field specified is equal to the default value (specified through the fields configuration) the model is considered as new.

options.fieldsObject

A set of key/value pairs the configure the model fields. The key specifies the name of the field. Quote the key if it contains spaces or other symbols which are not valid for a JavaScript identifier.

options.fields.fieldName.editableBoolean

Specifies the which will be used for the field when a new model instance is created. Default settings depend on the type of the field. Default for "string" is "", for "number" is 0 and for "date" is new Date() (today).

options.fields.fieldName.nullableBoolean

Specifies if the field is editable or not. The default value is true.

options.fields.fieldName.parseFunction

Specifies if the defaultValue setting should be used. The default is false.

options.fields.fieldName.typeString

Specifies the function which will parse the field value. If not set default parsers will be used.

options.fields.fieldName.validationObject

Specifies the type of the field. The available options are "string", "number", "boolean", "date". The default is "string".

js
var Task = kendo.data.SchedulerEvent.define({
    id: "taskId",
    fields: {
        taskId: { from: "TaskID", type: "number" },
        title: { from: "Title", defaultValue: "No title", validation: { required: true } },
        start: { type: "date", from: "Start" },
        end: { type: "date", from: "End" },
        startTimezone: { from: "StartTimezone" },
        endTimezone: { from: "EndTimezone" },
        description: { from: "Description" },
        recurrenceId: { from: "RecurrenceID" },
        recurrenceRule: { from: "RecurrenceRule" },
        recurrenceException: { from: "RecurrenceException" },
        ownerId: { from: "OwnerID", defaultValue: 1 },
        isAllDay: { type: "boolean", from: "IsAllDay" }
    }
});
Not finding the help you need?
Contact Support