How Bind Current Date on Kendo Angular Date Picker

Hi I am trying to use kendo date picker for angular. Everything works fine but on page load I want to bind current date like 4 August 2021 to display automatically. I tried different ways to do that but nothing works .

Here is my markup for the date picker,

<kendo-datepicker id="fromDate" [(ngModel)]="fromDate"
  class="m-2 col-md-12 col-xl-12 col-lg-12"  format="dd MMMM yyyy">
</kendo-datepicker>

1 Answer

So,Finally I Found a solution . On ngOnInit I added this piece of code

this.fromDate = new Date();

And found my desired output

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest