Skip to content

bug: Different color on ion-datetime when inside ion-modal and ion-content with scroll-y="false" #25755

Description

@raksakaindra

Prerequisites

Ionic Framework Version

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

Current Behavior

When implement ion-datetime inside ion-modal and ion-content with scroll-y="false", the color of all month-year presentation is same. The issue happened on Safari when dev with Responsive Design Mode (iOS 14.0-iPhone) and same condition on real device iPhone X iOS 15.6.

Here is the code:

  <ion-modal id="date-modal-log" trigger="open-modal-log">
    <ion-content scroll-y="false">
      <ion-toolbar class="modal">
        <ion-title>Pilih Periode</ion-title>
      </ion-toolbar>
      <ion-datetime
        locale="id-ID"
        max="2022-08"
        presentation="month-year"
        ref="datetime"
        v-model="resp.dateSelected"
      >
        <ion-buttons slot="buttons">
          <ion-button color="danger" fill="clear" @click="cancel"
            >Batal</ion-button
          >
          <ion-button color="hijau" fill="outline" type="submit" @click="today"
            >Hari Ini</ion-button
          >
          <ion-button color="hijau" fill="solid" type="submit" @click="confirm"
            >Cari</ion-button
          >
        </ion-buttons>
      </ion-datetime>
    </ion-content>
  </ion-modal>

The result:
Bug datetime

Expected Behavior

ion-datetime should be same color with ion-content scroll-y="true" inside the ion-modal

Steps to Reproduce

If I implement it on ion-modal and ion-content with scroll-y="true" or without parameter, the color are normal and same with Ionic documentation.
Normal condition

Code Reproduction URL

No response

Ionic Info

Ionic:
Ionic CLI : 6.20.1 (/Users/bmkg/.nvm/versions/node/v16.16.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/vue 6.2.2

Capacitor:
Capacitor CLI : 3.7.0
@capacitor/android : 3.7.0
@capacitor/core : 3.7.0
@capacitor/ios : 3.7.0

Utility:
cordova-res : 0.15.4
native-run : 1.6.0

System:
NodeJS : v16.16.0 (/Users/bmkg/.nvm/versions/node/v16.16.0/bin/node)
npm : 8.16.0
OS : macOS Monterey

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