Skip to content

bug: ios, next and prev buttons do not work when calendar grid is only partially visible #27913

Description

@thomasmassmann

Prerequisites

Ionic Framework Version

v6.x, v7.x

Current Behavior

The arrow buttons on ion-datetime do not work on iOS devices (web, simulator, real device) when the calendar grid is only partially visible (less than 3 rows of days).

Bringing the calendar into the viewport (3 rows or more), the arrow buttons work again.

Expected Behavior

The arrow buttons to switch between months work, even when only the arrow buttons are currently in visible to the user.

Steps to Reproduce

  1. Open https://docs-demo.ionic.io/component/datetime
  2. Open one of the calendar widgets.
  3. Ensure the calendar is fully visible.
  4. The arrow buttons allow changing the month.
  5. Ensure only 2 rows of the calendar days are visible.
  6. Try to change the month (more than 2, either direction is fine).
  7. With the first click, the month selection stays at the current month, but the days grid slides in the next/previous month).
  8. Any additional click on the arrow button has no effect.

Code Reproduction URL

https://github.com/ionic-team/docs-demo

Ionic Info

[WARN] You are not in an Ionic project directory. Project context may be
       missing.

Ionic:

   Ionic CLI : 7.1.1

Utility:

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

System:

   NodeJS : v18.16.0
   npm    : 9.5.1
   OS     : macOS Unknown

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