Styling placeholder of ion-datetime

It is possible to change color of the placeholder font on an ion-datetime input?

I’ve already tried with:

ion-datetime div.datetime-text{
color:…
}

and

ion-datetime div.datetime-placeholder{
color:…
}

But it doesn’t work

thanks

hey @Hanzo,

add this to your variables.css file: $datetime-ios-placeholder-color: "the color you want here"
this should resolve your problem.

i see it here at the bottom of the page: https://ionicframework.com/docs/api/components/datetime/DateTime/

1 Like

just change the css styling

.datetime-md .datetime-placeholder {
    color: #999;
}
1 Like

Thanks, both solutions works fine :wink:

you’re welcome

but @FnnHuman solution is better cause change only locally :+1: