New to Kendo UI for jQuery? Download free 30-day trial

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

  1. Reference the date input by using the setOptions method of the DateTimePicker.
  2. 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>

See Also

In this article