Default Value

By default, the DatePicker value is null and the Calendar popup is hidden.

The DatePicker provides options for:

Setting the Default Value

To set the initial value that is rendered by the DatePicker, set the defaultValue property. This approach allows the component to display a value upon its initial render while remaining in an uncontrolled state.

<div id="vueapp" class="vue-app">
   <div class="row">
        <div class="col-xs-12 col-md-12 example-col">
            <p>DatePicker with default value</p>
            <datepicker
                :default-value="defaultValue"
             ></dateinput>
        </div>
    </div>
</div>
import { DatePicker } from '@progress/kendo-vue-dateinputs';
Vue.component('datepicker', DatePicker);

new Vue({
    el: '#vueapp',
    data: function() {
        return {
            defaultValue: new Date()
        };
    }
});

Setting the Default Popup State

To display the calendar popup when the DatePicker initially renders, set the defaultShow property to true. This approach allows the component to show an open calendar popup while remaining in an uncontrolled state.

<div id="vueapp" class="vue-app">
   <div class="row">
        <div class="col-xs-12 col-md-12 example-col">
             <p>DatePicker with default shown state</p>
            <datepicker
                :default-show="defaultShow"
             >
             </dateinput>
        </div>
    </div>
</div>
import { DatePicker } from '@progress/kendo-vue-dateinputs';
Vue.component('datepicker', DatePicker);

new Vue({
    el: '#vueapp',
    data: function() {
        return {
            defaultShow: true
        };
    }
});

In this article