baumli
baumli

Reputation: 471

In an Ionic 4 input form, how do I change the input color of date text?

Using a form in Ionic 4, I've got all my other inputs to show as white text, but cannot change the input text of the date field. It keeps showing as black. The placeholder is white as well.

<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>

enter image description here

Upvotes: 0

Views: 681

Answers (1)

ahgood
ahgood

Reputation: 1937

You may like to try to add class="color-white" to:

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

And add following to css:

.color-white {
  color: white;
}

Upvotes: 2

Related Questions