Scheduler Overview
The Scheduler displays a set of events—appointments or tasks.
It provides the option to render scheduled events in different views—as a single day, a whole week, or month, or as a list of tasks which needs to be accomplished.
The Scheduler wrapper for Vue is a client-side wrapper for the Kendo UI Scheduler widget.
Basic Usage
The following example demonstrates how to initialize the Scheduler.
Installation
To initialize the Scheduler, either:
Initializing with Webpack
-
Install Kendo UI and add a theme.
npm install --save @progress/kendo-ui npm install --save @progress/kendo-theme-default
-
Install the Kendo UI Scheduler package for Vue.
npm install --save @progress/kendo-scheduler-vue-wrapper
-
Import the Kendo UI packages to the App component. If you use the Kendo UI components more than once in your application, add all Kendo UI-related files to the
main.js
file. If you use the Kendo UI components once in your application, add the Kendo UI-related files the component where they will be referred.import '@progress/kendo-ui' // This will import the entire Kendo UI library // As an alternative, you could import only the scripts that are used by a specific widget: // import '@progress/kendo-ui/js/kendo.scheduler' // Imports only the Scheduler script and its dependencies import '@progress/kendo-theme-default/dist/all.css' import { Scheduler } from '@progress/kendo-scheduler-vue-wrapper' import { SchedulerResource } from '@progress/kendo-scheduler-vue-wrapper' import { SchedulerView } from '@progress/kendo-scheduler-vue-wrapper' import { SchedulerInstaller } from '@progress/kendo-scheduler-vue-wrapper' Vue.use(SchedulerInstaller) new Vue({ el: '#app', components: { Scheduler } })
Functionality and Features
- Data binding
- Resources
- Selection
- Templates
- Restrictions
- Moving and resizing
- PDF export
- Keyboard navigation
- RTL support
Events
The following example demonstrates basic Scheduler events. You can subscribe to all Scheduler events by the handler name.
<div id="vueapp" class="vue-app">
<kendo-scheduler :data-source="localDataSource"
:date="date"
:height="600"
:timezone="'Etc/UTC'"
@change="onChange"
@edit="onEdit"
@add="onAdd"
@cancel="onCancel"
@dataBound="onDataBound"
@move="onMove"
@navigate="onNavigate"
@resize="onResize"
@save="onSave">
<kendo-scheduler-view :type="'day'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'workWeek'" :selected="true"></kendo-scheduler-view>
<kendo-scheduler-view :type="'week'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'month'"></kendo-scheduler-view>
<kendo-scheduler-view :type="'agenda'"></kendo-scheduler-view>
</kendo-scheduler>
</div>
Vue.use(SchedulerInstaller);
new Vue({
el: "#vueapp",
data: {
date: new Date('2013/6/6'),
localDataSource: [
{
id: 1,
start: new Date("2013/6/6 08:00 AM"),
end: new Date("2013/6/6 09:00 AM"),
title: "Interview"
},
{
id: 2,
start: new Date("2013/6/6 08:00 AM"),
end: new Date("2013/6/6 09:00 AM"),
title: "Meeting"
}
]
},
methods: {
onChange: function (ev) {
console.log("Event :: change");
},
onEdit: function (ev) {
console.log("Event :: edit");
},
onAdd: function (ev) {
console.log("Event :: add");
},
onCancel: function (ev) {
console.log("Event :: cancel");
},
onDataBound: function (ev) {
console.log("Event :: dataBound");
},
onMove: function (ev) {
console.log("Event :: move");
},
onNavigate: function (ev) {
console.log("Event :: navigate");
},
onResize: function (ev) {
console.log("Event :: resize");
},
onSave: function (ev) {
console.log("Event :: save");
}
}
})