【问题标题】:In an Ionic 4 input form, how do I change the input color of date text?在 Ionic 4 输入表单中,如何更改日期文本的输入颜色?
【发布时间】:2020-02-20 01:43:32
【问题描述】:

使用 Ionic 4 中的表单,我将所有其他输入显示为白色文本,但无法更改日期字段的输入文本。它一直显示为黑色。占位符也是白色的。

<ion-item class="animated fadeInUp ion-no-padding">
  <ion-label position="floating">
    <ion-icon name="birthday" item-start></ion-icon>
    Birthday
  </ion-label>
  <ion-datetime color="secondary" formControlName="birthday" displayFormat="MMM DD, YYYY" 
    min="1940-01-01" 
    max="2020-01-01" ></ion-datetime>
</ion-item>

【问题讨论】:

    标签: css angular ionic4


    【解决方案1】:

    您不妨尝试将class="color-white" 添加到:

    <ion-datetime class="color-white" color="secondary" formControlName="birthday" displayFormat="MMM DD, YYYY" 
        min="1940-01-01" 
        max="2020-01-01" ></ion-datetime>
    

    并在 css 中添加以下内容:

    .color-white {
      color: white;
    }
    

    【讨论】:

      猜你喜欢
      • 2015-10-20
      • 1970-01-01
      • 2023-03-29
      • 2022-06-15
      • 1970-01-01
      • 2020-09-08
      • 1970-01-01
      • 2020-04-24
      • 2021-12-06
      相关资源
      最近更新 更多