telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
464 stars 213 forks source link

[DateTimePicker] Custom validator #4286

Closed MatthieuBalmont closed 2 months ago

MatthieuBalmont commented 2 months ago

Describe the bug

When I add a specific validator in FormGroup for a kendo-datetimepicker and try to access any controller in my formGroup with the get function, I get the error "formGroup.get is not a function". It works normally for kendo 15.4.0

To Reproduce

  1. Create a FormGroup with validator for a kendo-datetimepicker
  2. Create a custom validator that accesses any control in the created FormGroup
  3. Try to access to any control in the FormGroup

Open the example : https://stackblitz.com/edit/angular-bug-datetimepicker

Expected behavior

I shoud get an FormGroup in my custom validator.

yanmariomenev commented 2 months ago

Thank you for the report @MatthieuBalmont.

I will mark this as duplicate of - https://github.com/telerik/kendo-angular/issues/4281

Downgrading to an older version will not throw an error - https://stackblitz.com/edit/angular-bug-datetimepicker-jmsftx?file=src%2Fapp%2Fapp.component.ts,package.json