Предыдущие даты можно увидеть, добавив canBackwardsSelected: true
к const options: CalendarModalOptions
, тогда код будет следующим: Ionic ModalController .
openCalendar() {
const options: CalendarModalOptions = {
title: 'BASIC',
canBackwardsSelected: true, //By making this true you can access the disabled dates
};
let myCalendar = this.modalCtrl.create(CalendarModal, {
options: options
});
myCalendar.present();
myCalendar.onDidDismiss((date: CalendarResult, type: string) => {
console.log(date);
})
}
Тогда вам просто нужно позвонитьopenCalendar()
от нажатия кнопки в конце HTML, чтобы увидеть включенные прошлые даты.