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

Set Default Value for Date Picker

Environment

Product Progress® Kendo UI® DatePicker for jQuery

Description

You can achieve this requirement using the value method provided by the component:

https://docs.telerik.com/kendo-ui/api/javascript/ui/datepicker/methods/value

Solution


    <input id="datepicker" />
    <script>
      $("#datepicker").kendoDatePicker({
        value: new Date(2013, 10, 10),
        format: "MMM yyyy",
        parseFormats: ["MMM yyyy"],
        depth: "year",
        start: "year"
      });

      var datepicker = $("#datepicker").data("kendoDatePicker");

      datepicker.value(new Date());
    </script>

In this article