# MultiView Calendar Controlled Mode

By default, the MultiView Calendar is in an uncontrolled state.

In Kendo UI for Vue, the MultiView Calendar is a configuration of the Calendar component. The MultiView Calendar provides options for:

* [Setting default values for the uncontrolled state](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/multiviewcalendar/controlled-state#setting-default-values)
* [Controlling the state](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/multiviewcalendar/controlled-state#controlling-the-state)
* [Programmatically changing the selected value](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/multiviewcalendar/controlled-state#programmatically-changing-the-value)

## Setting Default Values

The MultiView Calendar enables you to provide the initial values without the need to fully control its state by using the Calendar [`defaultValue`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#defaultvalue), [`focusedDate`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#focuseddate), and [`defaultActiveView`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#defaultactiveview) properties.

```vue
<template>
  <Calendar
    :views="2"
    :default-value="new Date(2018, 8, 8)"
    :focused-date="new Date(2018, 9, 8)"
    default-active-view="year"
  />
</template>
```

## Controlling the State

To manage the state of the MultiView Calendar, use the Calendar [`modelValue`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#modelvalue) property or the `v-model` directive, and handle the Calendar [`change`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#onchange) event if you need to react to the selection.

```vue
<template>
  <Calendar :views="2" v-model="value" />
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { Calendar } from '@progress/kendo-vue-dateinputs';

const value = ref<Date>(new Date());
</script>
```

## Programmatically Changing the Value

Each time the user selects a date, the MultiView Calendar updates its Calendar [`modelValue`](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops#modelvalue). To change the selected value based on external user interaction, set the new value through the `v-model` binding of the Calendar.

The following demo displays two views and lets you select the next or the previous Friday through external buttons.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/dateinputs/multiviewcalendar/controlled-state/source.txt)

## Suggested Links

* [API Reference of the Calendar](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs/api/calendarprops)
* [Kendo UI for Vue Date Inputs](https://www.telerik.com/kendo-vue-ui-develop/components/dateinputs)
