Skip to content

bug: date picker jumps to max date when navigating to next year  #25708

@daniel-zero

Description

@daniel-zero

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

When the max date property is used and the user moves from December 2022 to January 2023 the datepicker will switch to the given max date instead of moving to January

Expected Behavior

The datepicker should switch to January

Steps to Reproduce

  <ion-datetime
    locale="de-DE"
    presentation="date"
    [min]="'2022-08-03'"
    [max]="'2023-07-29'"
    showDefaultButtons="true"
    firstDayOfWeek="1"
  ></ion-datetime>

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.20.1 (/Users/danielsogl/.nvm/versions/node/v16.16.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.2.0
@angular-devkit/build-angular : 14.1.0
@angular-devkit/schematics : 14.1.0
@angular/cli : 14.1.0
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 4.0.1
@capacitor/android : not installed
@capacitor/core : 4.0.1
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.6.0

System:

NodeJS : v16.16.0 (/Users/danielsogl/.nvm/versions/node/v16.16.0/bin/node)
npm : 8.15.1
OS : macOS

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions