How to use localization for DatePicker control

1 Answer 20 Views
Date/Time Pickers DateInput Localization
Andriy
Top achievements
Rank 1
Andriy asked on 07 Feb 2024, 05:58 PM
While Telerik UI for jQuery has this option, I couldn't find any examples of how to use it for MVC:

$("#test").kendoDatePicker({
  dateInput: true,
  messages: {
    dateInput: {
      month: "__",
      year: "____",
      day: "__",
    },
  },
});

@(Html.Kendo().DatePicker()

.Name("ProcedureDateEnd")

.DateInput()

///// how to use messages here?

)



1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 12 Feb 2024, 08:41 AM

Hi Andriy,

Before proceeding with this discussion, I noticed that there is no active license associated with your account which limits our support service. Hence, I would recommend renewing your license to get a hold of all the latest bug fixes, features, and support services the product provides.

A list of the available support plans can be found here:

Regardless, I want to help achieve the desired requirement at hand with the Telerik UI for ASP.NET MVC DatePicker. Generally, the component exposes a Messages.DateInput() API configuration which allows you to explicitly specify the "Month", "Year", and "Day" messages in the following manner:

  • Telerik REPL for ASP.NET Core Example - Although the example tackles a Telerik UI for ASP.NET Core scenario, the same approach is also applicable to the Telerik UI for ASP.NET MVC DatePicker incarnation.

This should then produce the following visual representation:

I hope this helps.

Kind Regards,
Alexander
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Tags
Date/Time Pickers DateInput Localization
Asked by
Andriy
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or