0

I have a kendo-datepicker. I want to update its value using JavaScript. Following is the control in HTML:

  <kendo-datepicker [(value)]="departureDate" (valueChange)="changeDepartureDate()" [disabled]="readOnly" id="Depdate" ></kendo-datepicker>

Following is the JavaScript code

 var aa = new Date(this.selectedFfDeparture.date).getFullYear() + "-" + new Date(this.selectedFfDeparture.date).getMonth() + "-" + new Date(this.selectedFfDeparture.date).getDate();
  alert(aa);

  (<HTMLInputElement>document.getElementById('Depdate')).value = aa;
  alert((<HTMLInputElement>document.getElementById('Depdate')).value);

It is working fine with normal input of type date but not with Kendo. But weird thing is that i am able to set its value even in alert it shows that value has been changed but not shows in Kendo control.

halfer
  • 19,824
  • 17
  • 99
  • 186
RackM
  • 449
  • 7
  • 26
  • Possible duplicate of [Set Today date to kendo datepicker](https://stackoverflow.com/questions/25337509/set-today-date-to-kendo-datepicker) – Ritesh Nair Aug 21 '17 at 11:21
  • yes i visited that link but i dont know what kendo is in that solution – RackM Aug 21 '17 at 11:24

0 Answers0