Kendo UI for Vue Date Inputs Overview

The Kendo UI for Vue Date Inputs enable the user to pick up dates for scheduling appointments.

The Date Inputs components are part of the Kendo UI for Vue library which provides native Kendo UI components for the Vue ecosystem and are available under the kendo-vue-dateinputs NPM package.

Basic Usage

The following example demonstrates the Calendar, DateInput and DatePicker components in action.

<div id="vueapp" class="vue-app">
   <div class="row example-wrapper" :styles="{ minHeight: 450 }">
                <div class="col-xs-12 col-md-6 example-col">
                    <p>DateInput</p>
                    <date-input
                        v-model="value"
                    ></date-input>
                    <p>(use <code>←</code> and <code>→</code> to navigate, <code>↑</code> and <code>↓</code> to update)</p>
                    <p>DatePicker</p>
                    <date-picker
                        v-model="value"
                    ><date-picker>
                    <p>(use Alt+<code>↓</code> to open the calendar, <code>←</code> and <code>→</code> to navigate, <code>↑</code> to increment and <code>↓</code> to decrement the value)</p>
                </div>
                <div class="col-xs-12 col-md-6 example-col">
                    <calendar
                        v-model="value"
                    ></calendar>
                </div>
            </div>
</div>
import { Calendar, DateInput, DatePicker } from '@progress/kendo-vue-dateinputs';
Vue.component('calendar', Calendar);
Vue.component('date-input', DateInput);
Vue.component('date-picker', DatePicker);

new Vue({
    el: '#vueapp',
    data: function () {
        return {
           value: new Date()
        };
    },
    methods: {
        changeDate ({ value }) {
            this.value = value;
        }
    }
});

Installation

To initialize the Date Inputs, either:

Using CDN

You need to reference the dateinput and intl package, in order to be able to use the Kendo Native Date Inputs for Vue with CDN.

<script src="https://unpkg.com/@progress/kendo-vue-intl@latest/dist/cdn/js/kendo-vue-intl.js"></script>
 <script src="https://unpkg.com/@progress/kendo-vue-dateinputs@latest/dist/cdn/js/kendo-vue-dateinputs.js"></script>

Initializing with Webpack

  1. Download and install the package. Use Node.js v5.0.0 or later.

    npm install --save @progress/kendo-vue-dateinputs @progress/kendo-vue-intl
  2. Once installed, import the package module.

    // ES2015 module syntax
    import { DateInput, Calendar, DatePicker } from '@progress/kendo-vue-dateinputs';
    // CommonJS format
    const { DateInput, Calendar, DatePicker } = require('@progress/kendo-vue-dateinputs');
  3. You are required to install one of the Kendo UI themes to style your components. For more information on how to add the styles, refer to the article on getting started.

Dependencies

The Date Inputs package requires you to install the following peer dependencies in your application:

  • vue 2.6.11*
  • @progress/kendo-vue-intl

In this article