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)’
}
];
}
`
