Skip to content

DatePicker in Reactive Forms #416

Closed
Closed
@ChristianGalvez23

Description

@ChristianGalvez23

I have DatePicker installed in my app which is using Reactive Forms Paradigm.
I was building a view where I put this component as control, so, I came across that formControlDirective and the component don't work together, because I need to disable the component programmatically when certain conditions happen.

  1. I tried to set "disabled" formcontrol property to true/false and doesn't work.
  2. I tried to invoke "disable" method from DatePicker Component and this worked nice!

Nevertheless, the datepicker input doesn't change its appearence when I enabled the datepicker component or viceversa. To achieve the earlier behavior I have to click in the component and is like it was sleeping and when it wakes up it changes its appearence.

Check this out:
https://angular-p987mi.stackblitz.io
https://stackblitz.com/edit/angular-p987mi

Is DateTimePicker Component working well with Reactive Forms?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions