0
How do I make the form control name identify a field that is within a model I refer to? I’m having this error: Cannot find control with name: 'dtInicio'
i have this field in the formcontrol dtInicio:
<div class="p-field">
<label>Data inicial de inscrição</label>
<p-calendar
[locale]="pt"
[dateFormat]="'dd/mm/yy'"
[readonlyInput]="true"
[showButtonBar]="true"
formControlName="dtInicio"
tabindex="0"
maxlength="10">
</p-calendar>
</div>
My model is like this:
constructor(
public numeroEdital ?: string,
public inscricoes ?: EditalInscricaoModel,
) {
super();
}
how can I make my form control identify the dtInicio field, even though it is within another model that I refer to in this main model?