ng-aquila
ng-aquila copied to clipboard
dynamic form with multiple datepicker component
Hi guys, so currently I work with dynamic form which will generate component based on API response. Is it possible to generate multiple datepicker component. Like
@for (data of item.data; track data.value){
<nx-formfield #item.label label={{item.label}}>
<input
nxDatefield
nxInput
[datepicker]="data.controlName"
formControlName={{item.controlName}}
/>
<span nxFormfieldHint>MM/DD/YYYY</span>
<nx-datepicker-toggle
[for]="data.controlName"
nxFormfieldSuffix>
</nx-datepicker-toggle>
<nx-datepicker #data.controlName></nx-datepicker>
</nx-formfield>
}
Thanks in advance!