Setting Messages in Start and End DateInputs for DateRangePicker
Environment
Product | DateRangePicker for Progress® Telerik® UI for ASP.NET Core | Product Version | 2019.2.514 |
Description
How can I change the default day/month/year placeholder text in the Telerik UI for ASP.NET Core DateRangePicker?
Solution
To change the start and end input messages, reference the DateRangePicker and set the message options of the _startDateInput
and _endDateInput
:
<div id="dateRangePicker"></div>
<script>
$(function () {
var dateRangePicker = $("#dateRangePicker").kendoDateRangePicker().data("kendoDateRangePicker");
dateRangePicker._startDateInput.setOptions({
messages: {
"year": "yyyy",
"month": "mm",
"day": "dd",
"hour": "hh",
"minute": "mm",
"second": "ss",
"dayperiod": "am/pm",
}
});
dateRangePicker._endDateInput.setOptions({
messages: {
"year": "yyyy",
"month": "mm",
"day": "dd",
"hour": "hh",
"minute": "mm",
"second": "ss",
"dayperiod": "am/pm",
}
});
});
</script>