Skip to content

bug: Setting ion-datetime value does not update selected day #25776

@aktivdigital-frontend

Description

@aktivdigital-frontend

Prerequisites

Ionic Framework Version

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

Current Behavior

When setting the value of an ion-datetime in a setTimeout, the display date updates, but after opening the datetime, the selected day does not display.

Expected Behavior

After setting the value of a ion-datetime, the selected day should also update.

Steps to Reproduce

  1. Have an ion-datetime (example uses ion-datetime-button)
  2. Update the value after a few seconds
  3. Open the date picker
  4. Observe: The new value does not show as the selected day
  5. Expected: The new value would display as the highlighted/selected day

Code Reproduction URL

https://stackblitz.com/edit/angular-ramjpp?file=src%2Fapp%2Fexample.component.html,src%2Fapp%2Fexample.component.ts

Ionic Info

N/A

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