Maharoz Alam Mugdho
Maharoz Alam Mugdho

Reputation: 466

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>

enter image description here

Upvotes: 1

Views: 1316

Answers (1)

Maharoz Alam Mugdho
Maharoz Alam Mugdho

Reputation: 466

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

this.fromDate = new Date();

enter image description here

And found my desired output

Upvotes: 2

Related Questions