Hello,
i’m trying to dynamically set the min and max values for the v6 datetime component.
If i use viewchild
<ion-datetime #datePicker size="cover" presentation="time" hourCycle="h23" [(ngModel)]="time"></ion-datetime>
@ViewChild('datePicker') datePicker: IonDatetime;
this.datePicker.min='2021-12-20T11:00';
I get TypeError: Cannot set properties of undefined (setting ‘min’)
And if i use
<ion-datetime size="cover" presentation="time" hourCycle="h23" [(ngModel)]="time" min="min" max="max"></ion-datetime>
min: string = "2021-12-20T13:00";
max: string = "2021-12-20T23:59";
I get Cannot destructure property ‘month’ of ‘parseDate(…)’ as it is undefined.
I there a way to set these properties ? It was working with the prev datetime comp
Thank you
1 post - 1 participant