Set Today date to kendo datepicker Set Today date to kendo datepicker jquery jquery

Set Today date to kendo datepicker


I tried following and works perfectly for me.

$('#btnClear').click(function () {  var todayDate = kendo.toString(kendo.parseDate(new Date()), 'MM/dd/yyyy');  $("#StartDate").data("kendoDatePicker").value(todayDate);});


 $('#btnClear').click(function (e) {  var todayDate = new Date();  $('#StartDate').data("kendoDatePicker").value(todayDate);                                  });


After setting the value of the datepicker, you need to trigger the change event of the datePicker e.g:

$("#StartDate").data("kendoDatePicker").trigger("change");

Explanation from Telerik:

"The DatePicker will not apply the "new" date if it is the same as its internal value. When you call the date in the method [they mean by using datepicker.value(myDate)] and just set its date, then the internal date of the DatePicker is set too"

See also http://www.telerik.com/forums/datepicker-does-not-update-the-value-in-view