Description
Ionic version: (check one with "x")
[ ] 2.x
[ ] 3.x
[ ] 4.x
[x] 5.x
Ion2-calendar mode: (check one with "x")
[ ] components mode
[x ] modal mode
I'm submitting a ... (check one with "x")
[x ] bug report
[ ] feature request
[ ] help me
Current behavior:
Configuring a modal I am unable to select any date before the current date.
Expected behavior:
I should be able to select dates earlier than the current date
Steps to reproduce:
Create a modal and present. Dates before the current date are greyed out and not selectable. Cannot move backwards.
I have tried setting the to
, from
and defaultDate
options, but none have any impact - hence omitting them below as it gives the same result.
Related code:
const options: CalendarModalOptions = {
title: 'Select date',
color: 'primary',
pickMode: 'single',
closeIcon: false,
closeLabel: '',
doneLabel: 'Set date',
};
const modal = await this.modalController.create({
component: CalendarModal,
componentProps: options
});
await modal.present();
Other information:
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
Ionic:
Ionic CLI : 6.16.1 (/Users/jasonmcclean/n_local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.6.7
@angular-devkit/build-angular : 12.0.1
@angular-devkit/schematics : 12.0.1
@angular/cli : 12.0.1
@ionic/angular-toolkit : 4.0.0
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v14.17.0 (/Users/jasonmcclean/n_local/bin/node)
npm : 6.14.13
OS : macOS Big Sur
As can be seen below, everything before the current date (29th June 2021), is not selectable. I have used this component on several projects (prior to Ionic 5), with no issues.