-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Closed
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
When setting the minimum DateTime to now (new Date()), there is no way to select previous minutes even on a different hour.
And the hour wheel doesn't respect the default h23 even when specified.
Expected Behavior
- The min value should restrict only up to what is specified. if minimum was set to 19:30, I should be able to select 20:everthing else
- The hour should stick to the default hour system or the specified one
Steps to Reproduce
RPReplay_Final1640193110.2.mp4
now = moment().add(1, 'h').format();
minInsterval: number[];
dateTime:any
ngOnInit() {
const min = 0,
max = 55,
interval = 5;
const length = (max - min) / interval + 1;
this.minInsterval = Array.from({ length }, (_, i) => min + i * interval);
}
<ion-datetime
#calendar
size="cover"
hourCycle="h23"
[min]="now"
[minuteValues]="minInsterval"
[(ngModel)]="dateTime"
>
</ion-datetime>
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (/Users/jonathan/.nvm/versions/node/v16.13.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 13.1.2
@angular-devkit/schematics : 13.1.2
@angular/cli : 13.1.2
@ionic/angular-toolkit : 5.0.3
Additional Information
No response
Metadata
Metadata
Assignees
Labels
package: core@ionic/core package@ionic/core packagetype: buga confirmed bug reporta confirmed bug report