Ion-datetime only working in current month

Hey, I just love the new look of ion-datetime. Unfortunately it’s only working well in the current month.

date-gif

Here’s my code (ionic 6.0.1):

<ion-item>

    <ion-label>{{ 'AUDIT.date' | translate }}</ion-label>

    <ion-text slot="end">{{ audit.date | date:'dd.MM.yyyy' }}</ion-text>

    <ion-button slot="end" fill="clear" id="open-date-input">

      <ion-icon icon="calendar"></ion-icon>

    </ion-button>

    <ion-popover trigger="open-date-input" show-backdrop="true">

      <ng-template>

        <ion-datetime #popoverDatetime presentation="date" max="2025" [min]="today.startMin" mode='md'

          (ionChange)="audit.date = popoverDatetime.value">

        </ion-datetime>

      </ng-template>

    </ion-popover>

  </ion-item>

But I also tried it with just

<ion-datetime> </ion-datetime>

with the same result.

i’m sure the problem of that datepicker is the [min] value

Just for being sure, remove min and max and execute it again.
If works correctly, add the max value.
Again, if works, add a min=“2022-01-31” value as test, if still works, the problem is in the today.startMin value

No, also with the minimum datetime it’s the same.

maybe it misses the [value] tag?

I tried all versions from the docs, the appearance is always the same.

i just made a new demo with a ionic starter project:
everything works as expected

Registrazione schermo 2021-12-23 alle 13.55.34

or if you want to close the datepicker on click, just set the .confirm(true) attribute

Registrazione schermo 2021-12-23 alle 13.58.19

Thanks for checking this out! I upgraded from ionic 5, so is it possible that there is the problem somewhere?

copy and paste here your ionic info output, so we can check.
Anyway, I tried to update from version 5 and the datetime still works, have you tried to start a blank project and try the datetime?

Also a blank project doesn’t work :see_no_evil:

Ionic info:

   Ionic CLI                     : 6.18.1 
   Ionic Framework               : @ionic/angular 6.0.1
   @angular-devkit/build-angular : 12.2.2
   @angular-devkit/schematics    : 12.2.14
   @angular/cli                  : 12.2.2
   @ionic/angular-toolkit        : 5.0.3

That’s really weird. Can you show me all the code? Html and .ts file please

Whole file pretty long, but it’s the same with the blank starter: Only thing I added to the

ionic start myApp blank

is

<ion-datetime></ion-datetime>

on the home.page.html

Ionic info there is:

   Ionic CLI                     : 6.18.1
   Ionic Framework               : @ionic/angular 6.0.1
   @angular-devkit/build-angular : 13.0.4
   @angular-devkit/schematics    : 13.0.4
   @angular/cli                  : 13.0.4
   @ionic/angular-toolkit        : 5.0.3

I’m always testing with chrome, tried it now with firefox and it’s working there. Deleting all data from chrome made no difference. Is it possible that there’s a problem with chrome?

I don’t think so, i’m using with chrome.
Try to execute it in incognito

It’s the same in incognito mode :see_no_evil:

If you want, send me the src folder of your app, i will investigate

Thanks!
Here is the src folder: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.

On MS Edge it’s the same problem…