Skip to content
This repository was archived by the owner on Mar 2, 2018. It is now read-only.

Commit 8cdc947

Browse files
committed
ngui-datetime-picker user formControlName in FormArray has error
1 parent 608fd46 commit 8cdc947

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/datetime-picker.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ export class NguiDatetimePickerDirective implements OnInit, OnChanges {
121121
if(this.parent && this.formControlName) {
122122
if (this.parent["form"]) {
123123
this.ctrl = (<FormGroup>this.parent["form"]).get(this.formControlName);
124-
} else if (this.parent["name"]) {
124+
} else if (this.parent["path"]) {
125125
let formDir = this.parent.formDirective;
126-
if (formDir instanceof FormGroupDirective && formDir.form.get(this.parent["name"])) {
127-
this.ctrl = formDir.form.get(this.parent["name"]).get(this.formControlName);
126+
if (formDir instanceof FormGroupDirective && formDir.form.get(this.parent["path"])) {
127+
this.ctrl = formDir.form.get(this.parent["path"]).get(this.formControlName);
128128
}
129129
}
130130
if (this.ctrl) {

0 commit comments

Comments
 (0)