Hi,
I have problems with my popover, as it only works with the first datatime it finds in the JSON and the second one fails and assigns all date types the same value, I have the following:
<div *ngIf="field.type === 'date'">
<ion-label position="floating">{{ field.label }}</ion-label>
<ion-item button="true" id="open-date-input">
<ion-label>{{ field.label }}</ion-label>
<ion-text slot="end">{{ field.value }}</ion-text>
<ion-popover trigger="open-date-input" show-backdrop="false">
<ng-template>
<ion-datetime
#popoverDatetime
presentation="date"
[formControlName]="field.name"
(ionChange)="field.value = formatDate(popoverDatetime.value)"
></ion-datetime>
</ng-template>
</ion-popover>
</ion-item>
<!-- I don't like this one as it takes up a lot
of space and that's why I chose the popover -->
<!-- <ion-datetime
[value]="field.value"
[formControlName]="field.name"
></ion-datetime> -->
</div>
This is in the IONIC documentation [ion-datetime: Ionic API Input for Datetime Format Picker https://ionicframework.com/docs/api/datetime:
Thank you