Skip to content

bug: ion-datetime opens to incorrect date when multiple dates from different months are selected #29604

Closed as not planned
@kemp

Description

@kemp

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When instantiating an IonDatetime with the following parameters (for example):

  <ion-datetime
    presentation="date"
    :multiple="true"
    :value="['2024-05-26', '2024-06-10']"
  />

the date picker is presented in May of 2021. I tested with a few other dates, and it seems the issue persists, I'm not sure of the pattern.

Expected Behavior

It is expected that the date picker would open to either May or June of 2024.

Steps to Reproduce

  1. Open the reproduction URL, which was forked from the example documentation

Code Reproduction URL

https://stackblitz.com/edit/nuuduy?file=src%2Fcomponents%2FExample.vue

Ionic Info

Ionic:

   Ionic CLI : 5.4.16

Utility:

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

System:

   NodeJS : v18.20.3
   npm    : 10.2.3
   OS     : Linux 5.0

(this is from the StackBlitz project)

Additional Information

I tested in Firefox 125.0.2 and Chrome Version 125.0.6422.60 (Official Build) (64-bit) and received the same result in both.

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