Skip to content

bug: new ion-date time next button jumps 2 months instead of 1 #24720

@RayanMoarkech

Description

@RayanMoarkech

Prerequisites

Ionic Framework Version

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

Current Behavior

Issue on iOS, Android, Web
With the new Ionic v6, the ion-datetime has a next (>) and back (<) button to switch months. Both buttons jumps 2 months instead of 1 month.
Example: If I am currently in April 2021 and I click next (>), it will jump directly to June 2021.
You can also check the emulator in this example: https://ionicframework.com/docs/api/datetime.

Expected Behavior

Next and back button for ion-datetime should jump only 1 month. Example: If I am currently in April 2021 and I click next (>), it should go directly to May 2021.

Steps to Reproduce

Open any ion-datetime with at least presentation="date". Click the next (>) or back (<) buttons. Observe the months changing. It even happens in the emulator of https://ionicframework.com/docs/api/datetime example.

Code Reproduction URL

https://ionicframework.com/docs/api/datetime

Ionic Info

Ionic:

Ionic CLI : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.4
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 13.2.1
@angular/cli : 13.2.1
@ionic/angular-toolkit : 5.0.3

Cordova:

Cordova CLI : 11.0.0
Cordova Platforms : android 10.1.1, browser 6.0.0, ios broken
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 25 other plugins)

Utility:

cordova-res (update available: 0.15.4) : 0.15.3
native-run (update available: 1.5.0) : 1.4.0

System:

ios-deploy : 1.11.4
ios-sim : 8.0.2
NodeJS : v16.13.2 (/usr/local/bin/node)
npm : 8.4.0
OS : macOS Monterey
Xcode : Xcode 13.2.1 Build version 13C100

Additional Information

Screen.Recording.2022-02-04.at.11.23.50.AM.mov

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