Im Used ion2-calendar https://github.com/HsuanXyz/ion2-calendar for my university project ,I’m used Multi option, Im try to added event for this calendar , but its not work, I want to know how to added event for this calendar , like my attached image (look at attached image )
this is my code
<ion-calendar [(ngModel)]="dateMulti"
[options]="optionsMulti"
[type]="type"
[format]="'YYYY-MM-DD'">
</ion-calendar>
.ts
import { Component } from '@angular/core';
import { CalendarComponentOptions } from 'ion2-calendar'
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
dateMulti: string[];
type: 'string'; // 'string' | 'js-date' | 'moment' | 'time' | 'object'
optionsMulti: CalendarComponentOptions = {
pickMode: 'multi'
};
constructor() { }
multi() {
const options = {
pickMode: 'multi',
title: 'MULTI',
defaultDates: [moment(), moment().add(1, 'd'), moment().add(2, 'd')]
};
let myCalendar = this.modalCtrl.create(CalendarModal, {
options: options
});
myCalendar.present();
myCalendar.onDidDismiss(date => {
console.log(date);
})
} }