I have been trying to use ion-datetime wit highlightedDates but it gives me ths error:
PD: im following the documentation.
How I can solve it?
Ionic version: 6.20.9
This is my HTML code
<ion-popover #popover side="left" alignment="start" class="pop-over"> <ng-template> <ion-datetime [highlightedDates]="highlightedDates" id="calendar" presentation="date" preferWheel="false" value="2023-03-01" [showDefaultButtons]="false" multiple="true" ></ion-datetime> </ng-template> </ion-popover>
My typescript Code:
`
import { Component, OnInit, ViewChild } from β@angular/coreβ;
import { ItemReorderEventDetail, IonPopover } from β@ionic/angularβ;
export class DatesPage implements OnInit {
public trip: Trip;
public selectedButton: number = 0;
private calendarOpened: boolean = false;
public rangesDates: any = ;
highlightedDates = [
{
date: β2023-03-05β,
textColor: β#800080β,
backgroundColor: β#ffc0cbβ,
},
{
date: β2023-03-10β,
textColor: β#09721bβ,
backgroundColor: β#c8e5d0β,
},
{
date: β2023-03-20β,
textColor: βvar(βion-color-secondary-contrast)β,
backgroundColor: βvar(βion-color-secondary)β,
},
{
date: β2023-03-23β,
textColor: βrgb(68, 10, 184)β,
backgroundColor: βrgb(211, 200, 229)β
}
];
}
`