cherry
March 14, 2024, 7:57am
1
Hello I am trying to change the color of a disabled input but it still is greyed out, if i change the color to red or blue or whatever it works but not with the color white, what did I do wrong?
HTML:
<ion-input label=“Datum” label-placement=“floating” fill=“outline” placeholder=“Datum” value=“{{item.Date}}” [disabled]=“true” class=“disabled_input”>
CSS:
.disabled_input {
color: white;
}
Result:
Thanks for any help!
Hi,
What you indicate works for me
Maybe there is another style that overwrites yours.
Have you tried with
.disabled_input {
color: white !important;
}
Greetings
cherry
March 14, 2024, 6:01pm
3
I have already tried this, no it doesn’t work
Try this. When disabled, Ionic is adding opacity: 0.3
. DevTools is your friend!
ion-input.md.input-disabled,
ion-input.ios.input-disabled {
opacity: 1;
}
.disabled_input {
color: white;
}
1 Like
cherry
March 15, 2024, 8:15am
5
Thank you this worked like a charm!
1 Like