Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

igx-date-picker doesn't seems to be working with reactive form #8919

Closed
umermalik129 opened this issue Feb 8, 2021 · 5 comments · Fixed by #9160
Closed

igx-date-picker doesn't seems to be working with reactive form #8919

umermalik129 opened this issue Feb 8, 2021 · 5 comments · Fixed by #9160

Comments

@umermalik129
Copy link

Question

I am having trouble with the date picker component when I use it with reactive form, I am setting formControlName and getting the following error

ERROR TypeError: value.toLocaleDateString is not a function

date.component.html
<igx-date-picker [weekStart]="weekStart" [formControlName]="field.protocolDictId" [id]="field.id"> <label igxLabel>{{field.labelText !== '' ? field.labelText : field.name}}</label> </igx-date-picker>

date.component.ts
const required = this.field.required ? [Validators.required] : null; this.form.addControl(this.field.protocolDictId, new FormControl(new Date(Date.now()), {validators: required, updateOn: 'blur'}));

I have the same code working for other ignite components but having a problem with date-picker component

  • igniteui-angular version: 7.0.1
  • browser: Chrome, Firefox
@Lipata
Copy link
Member

Lipata commented Feb 9, 2021

@umermalik129 we are not supporting version 7.x.x, can you try with newer version, like 11.0.13? We are also doing a refactoring on the component #6483 .

@umermalik129
Copy link
Author

@Lipata sorry I mentioned the wrong version, the correct version is 11.0.12

@Lipata
Copy link
Member

Lipata commented Feb 9, 2021

@umermalik129 we are fixing that with the refactoring of the component #6483.

@umermalik129
Copy link
Author

ok Thank you

@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Apr 11, 2021
@Lipata Lipata removed the status: inactive Used to stale issues and pull requests label Apr 12, 2021
@Lipata Lipata mentioned this issue Apr 14, 2021
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants