Set DateInput Messages of DateTimePicker

Environment

Product DateTimePicker for ProgressĀ® Kendo UIĀ®
Product Version 2019.1.220

Description

How can I configure the messages of the Kendo UI DateTimePicker's dateInput?

Solution

Using the DateTimePicker's setOptions method, reference the dateinput, and 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
Not finding the help you need? Improve this article