Ngx-bootstrap: feat(datepicker): There is a way of use datepickers in reactives forms?

Created on 25 Aug 2016  路  24Comments  路  Source: valor-software/ngx-bootstrap

Actually i need to use validators on each form, so i was wondering if there is a way of use FormControl instead of ngModel, thanks in advance.

comp(datepicker)

Most helpful comment

This week finishing modal service and time picker,
Starting from next week focus on finishing datepicker and Typeahead

All 24 comments

I also have this problem.

Is there a way to use datepicker in reactive form?

Actually i need to use validators on each form, so i was wondering if there
is a way of use FormControl instead of ngModel, thanks in advance.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/valor-software/ng2-bootstrap/issues/893

+1

I need this too. :(

@GuskiS If you need a workaround: I had to pull in the PrimeNG library to get a datepicker I can use with reactive forms.

@iherbivore Thanks, I will look into.

Sweet, any ideas when this gonna be NPM?

I need to add new injection service, to work with 2.2+

With out hacks

I'm anxious to see this change released as well, and there is the same issue with the typeahead control...

BTW date picker should work with reactive forms in latest versions
New injection service released, you can check popover implementation.

I tried it in v1.1.16-7 and it wasn't working when used like this:

  <datepicker [formControlName]='field.name' [name]='field.name' ...></datepicker>

because name wasn't valid attribute for datepicker, but I need the name.

Update came somewhere 16-9+

i want to use timepicker with formControlname="time", but get NaN as a value. Is this because it's not supported or i'm doing something wrong?

Facing the same issue. If it's working with the newest version, so that would would be nice to have a working plunkr as example and updated documentation as well.

<datepicker formControlName="license_expire_date" [formControl]="registerFormProvider.controls['license_expire_date']" name="license_expire_date"></datepicker>

throws: 'datepicker' is not a known element:

I'm also facing the same problem any solution to this ?

Any news?

This week finishing modal service and time picker,
Starting from next week focus on finishing datepicker and Typeahead

We need this feature!

any news on this feature ?

Latest and @next versions has it for a long time

Was this page helpful?
0 / 5 - 0 ratings