# Setting the DateInput Messages of the DateTimePicker

## Environment

<table>
 <tr>
  <td>Product</td>
  <td>Telerik UI for ASP.NET MVC DateTimePicker</td>
 </tr>
 <tr>
  <td>Progress Telerik UI for ASP.NET MVC version</td>
  <td>Created with the 2022.2.802 version</td>
 </tr>
</table>

## Description

How can I configure the messages of the date input in the Telerik UI for ASP.NET MVC DateTimePicker?

## Solution

To achieve the desired scenario, reference the `dateInput` of the DateTimePicker and use the [`setOptions`](https://docs.telerik.com/kendo-ui/api/ui/datetimepicker/methods/setoptions) method of the DateTimePicker to change its messages.

```Razor Index.cshtml

    @(Html.Kendo().DatePicker()
            .Name("datepicker")
            .DateInput()
            .HtmlAttributes(new { style = "width: 100%", title = "datepicker" })
    )

```

```JS script.js

    <script>
        $(document).ready(function () {
            var datetimepicker = $("#OrderDate").data("kendoDatePicker");
            datetimepicker._dateInput.setOptions({
                messages: {
                    "year": "YYYY",
                    "month": "MM",
                    "day": "DD"
                }
            });
        })
    </script>

```

For the complete implementation of the suggested approach, refer to the [Telerik REPL example on setting the date input messages of the DateTimePicker](https://netcorerepl.telerik.com/cwPlmlFH31nEdqv650).

## More ASP.NET MVC DateTimePicker Resources

* [ASP.NET MVC DateTimePicker Documentation](https://www.telerik.com/aspnet-mvc/documentation/html-helpers/editors/datetimepicker/overview)

* [ASP.NET MVC DateTimePicker Demos](https://demos.telerik.com/aspnet-mvc/datetimepicker/index)

* [ASP.NET MVC DateTimePicker Product Page](https://www.telerik.com/aspnet-mvc/datetimepicker)

* [Telerik UI for ASP.NET MVC Video Onboarding Course (Free for trial users and license holders)](https://www.telerik.com/aspnet-mvc/documentation/getting-started/video-onboarding)

* [Telerik UI for ASP.NET MVC Forums](https://www.telerik.com/forums/aspnet-mvc)

## See Also

* [Telerik REPL: Setting the Date Input Messages of the DateTimePicker](https://netcorerepl.telerik.com/cwPlmlFH31nEdqv650)
* [Client-Side API Reference of the DateTimePicker for ASP.NET MVC](https://docs.telerik.com/kendo-ui/api/ui/datetimepicker)
* [Server-Side API Reference of the DateTimePicker for ASP.NET MVC](https://docs.telerik.com/aspnet-mvc/api/datetimepicker)
* [Telerik UI for ASP.NET MVC Breaking Changes](https://www.telerik.com/aspnet-mvc/documentation/backwards-compatibility/2023-backwards-compatibility)
* [Telerik UI for ASP.NET MVC Knowledge Base](https://docs.telerik.com/aspnet-mvc/knowledge-base)
