# Date Editing

The Telerik UI DateInput for ASP.NET MVC exposes several configuration methods that allow you to control the behavior of the component when a user edits the date.

## Auto-Switch Parts

The following example demonstrates how to enable switching to the next segment of the date automatically when a valid input is set with the `AutoSwitchParts` configuration method.

```Razor HtmlHelper
    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .AutoSwitchParts(true)
    )
```

## Auto-Switch Keys

The `AutoSwitchKeys` configuration enables you to set up custom symbols that switch to the next segment of the date when entered.

```Razor HtmlHelper
    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .AutoSwitchKeys(new string[]{"+"})
    )
```

## Mouse Wheel

When set to `true`, the `EnableMouseWheel` setting allows the user to change the selected date segment by scrolling the mouse wheel.

```Razor HtmlHelper
    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .EnableMouseWheel(true)
    )
```

## Auto-Correct

The `AutoCorrect` configuration turns on or off auto-correct of the date segments.

```Razor HtmlHelper
    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .AutoCorrect(true)
    )
```

## Steps

The following example demonstrates how to configure the step change for each date segment when the user navigates with the mouse wheel or the keyboard arrows. Based on the preferred format of the DateInput's date, the available `Step` configurations are `Year`, `Month`, `Day`, `Minute`, `Second`, and `Millisecond`.

```Razor HtmlHelper
    @(Html.Kendo().DateInput()
        .Name("dateinput")
        .Steps(steps=>{
            steps.Year(4);
            steps.Month(6);
            steps.Day(14);
        })
    )
```

## Select the Day Segment When Empty

The DateInput has no option for selecting the initial date segment. For a custom focus handler, see [Select the Day Segment in an Empty DateInput](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base/dateinput-select-day-when-empty).

## See Also

* [Date Editing of the DateInput for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/dateinput/date-editing)
* [Using the API of the DateInput for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/dateinput/api)
* [Client-Side API of the DateInput](https://docs.telerik.com/kendo-ui/api/ui/dateinput)
* [Server-Side API](https://www.telerik.com/aspnet-mvc/documentation/api/dateinput)
* [Knowledge Base Section](https://www.telerik.com/aspnet-mvc/documentation/knowledge-base)
