This is a migrated thread and some comments may be shown as answers.

kendo-datepicker not populating

1 Answer 1999 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 14 May 2018, 06:27 PM

Why the date-picker always empty? I tried to set the value from the typescript various way, but it always end up empty. What the right way to do it?

.ts

birthDate: new FormControl(new Date('Wed May 16 2018 00:00:00 GMT-0400')),

birthDate: new FormControl(new Date(2000, 10, 10)),

birthDate: new Date(2000, 10, 10),

.html

<kendo-datepicker formControlName="birthDate"
                          required></kendo-datepicker>

Thanks,

Bryian Tan

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 15 May 2018, 06:17 AM
Hello Bryian,

The DatePicker component is designed to work with Angular forms, both reactive and template-driven, demonstrated in our online examples.

https://www.telerik.com/kendo-angular-ui/components/dateinputs/datepicker/forms/

In that specific case, I assume that either the given date value is invalid or there is a misconfiguration in the formControlName. In order to narrow the problem down I've prepared a simple demo.

https://plnkr.co/edit/ZPAbNUOx61NXtCE5dbBa?p=preview

Could you review it and if possible modify it in order to demonstrate the erroneous behavior? This will help us a lot in our attempt to find the cause of the issue.

Regards,
Georgi Krustev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or