# Date Editing

The Telerik UI DateInput for ASP.NET Core 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)
    )
```

```Razor TagHelper
    <kendo-dateinput name="dateinput" auto-switch-parts="false">
    </kendo-dateinput>
```

## 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[]{"+"})
    )
```

```Razor TagHelper
    <kendo-dateinput name="dateinput" 
        auto-switch-keys='new string[] { "+" }'>
    </kendo-dateinput>
```

## 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)
    )
```

```Razor TagHelper
    <kendo-dateinput name="dateinput" 
        enable-mouse-wheel="true">
    </kendo-dateinput>
```

## Auto-Correct

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

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

```Razor TagHelper
    <kendo-dateinput name="dateinput" auto-correct="true">
    </kendo-dateinput>
```

## 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);
        })
    )
```

```Razor TagHelper
    <kendo-dateinput name="dateinput">
        <steps year="4" month="6" day="14" />
    </kendo-dateinput>
```

## 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-core-ui/documentation/knowledge-base/dateinput-select-day-when-empty).

## See Also

* [Date Editing of the DateInput for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/dateinput/date-editing)
* [Using the API of the DateInput for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/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-core-ui/documentation/api/dateinput)
* [Knowledge Base Section](https://www.telerik.com/aspnet-core-ui/documentation/knowledge-base)
