# Controlled Mode

By default, the Calendar is in an uncontrolled state.

The Calendar provides options for:

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

## Setting Default Values

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

[Demo Source](https://demos.telerik.com/kendo-react-ui/dateinputs/calendar/controlled-mode/default-values/func/source.txt)

## Controlling the State

To manage the state of the Calendar, use its [`value`](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs/api/calendarprops#value) and [`onChange`](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs/api/calendarprops#onchange) properties.

The following demo shows how you can control the value of the Calendar and display it.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dateinputs/calendar/controlled-mode/controlled-state/func/source.txt)

## Programmatically Changing the Value

Each time the user selects a date, the Calendar calls the [`onChange`](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs/api/calendarprops#onchange) handler to update its [`value`](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs/api/calendarprops#value). To programmatically change the selected value based on external user interaction, set the new value through the state of the Calendar component.

The following demo lets you select the next or the previous Friday through external buttons by managing the state of the Calendar.

[Demo Source](https://demos.telerik.com/kendo-react-ui/dateinputs/calendar/controlled-mode/programmatically-changed-values/func/source.txt)

## Suggested Links

* [API Reference of the Calendar](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs/api/calendarprops)
* [React Date Inputs](https://www.telerik.com/kendo-react-ui-develop/components/dateinputs)
