Set DateInput Messages of DateTimePicker
Environment
Product | Progress® Kendo UI® DateTimePicker for jQuery | Product Version | 2019.1.220 |
Description
How can I configure the messages of the date input in the Kendo UI DateTimePicker?
Solution
- Reference the date input by using the
setOptions
method of the DateTimePicker. - Change its
messages
.
<input id="datetimepicker" title="datetimepicker" style="width: 100%;" />
<script>
$(document).ready(function () {
$("#datetimepicker").kendoDateTimePicker({
dateInput: true
});
var datetimepicker = $("#datetimepicker").data("kendoDateTimePicker");
datetimepicker._dateInput.setOptions({
messages:{
"year": "yyyy",
"month": "mm",
"day": "dd",
"hour": "hh",
"minute": "mm",
"second": "ss",
"dayperiod": "am/pm",
}
});
});
</script>