Skip to content

Latest commit

 

History

History
173 lines (142 loc) · 5.64 KB

File metadata and controls

173 lines (142 loc) · 5.64 KB
title page_title description slug canonicalLink position
Overview
Scheduler Overview - Components - Kendo UI for Vue
Get an overview of the features the Kendo UI Scheduler wrapper for Vue delivers and use the component in Vue projects.
overview_scheduler_wrapper
0

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.

{% meta height:665 %} {% embed_file basic/main.vue preview %} {% embed_file basic/main.js %} {% endmeta %}

Installation

To initialize the Scheduler, either:

  • [Use the CDN service]({% slug using_cdn %}), or
  • Use Webpack.

Initializing with Webpack

  1. Install Kendo UI and add a theme.

    npm install --save @progress/kendo-ui
    npm install --save @progress/kendo-theme-default
  2. Install the Kendo UI Scheduler package for Vue.

    npm install --save @progress/kendo-scheduler-vue-wrapper
  3. 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]({% slug databinding_scheduler_wrapper %})
  • [Resources]({% slug resources_scheduler_wrapper %})
  • [Selection]({% slug selection_scheduler_wrapper %})
  • [Templates]({% slug template_scheduler_wrapper %})
  • [Restrictions]({% slug restriction_scheduler_wrapper %})
  • [Moving and resizing]({% slug snap_move_scheduler_wrapper %})
  • [PDF export]({% slug pdf_export_scheduler_wrapper %})
  • [Keyboard navigation]({% slug resources_scheduler_wrapper %})
  • [RTL support]({% slug right_to_left_support_scheduler_wrapper %})

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");
        }
    }
})

Suggested Links