Set date of a datepicker - Forum - Kendo UI Builder - Progress Community

Set date of a datepicker

This question is not answered


I have a datepicker that is not connected to a datasource.
How can I set the date in the onShow event so the date is shown when the module is opened?

Best regards,

All Replies
  • As an alternative, I can put a datepicker in a Custom HTML component, how do I convert the following examples:

    <input id="dateTimePicker">
         value: new Date(2017, 4, 23, 0, 0, 0), 
         min: new Date(2017, 4, 1, 0, 0, 0),
         max: new Date(2017, 4, 31, 23, 59, 59),
         format: "dd-MM-yyyy hh:mm" }); 


    <div ng-app="app" ng-controller="MyCtrl">
            <input kendo-date-picker>
    var app = angular.module("your-angular-app", [ "kendo.directives" ]);
      angular.module("app", ["kendo.directives"]).controller("MyCtrl", function($scope) {
  • My solution is: angular.element("#datepicker0").data("kendoDatePicker").value(new Date());