How To Change Placeholder Color Of Ion-Select

How To Change Placeholder Color Of Ion-Select

Open the .Ts File of your page the put this code there. example if you using select in register page then open the register.ts file and paste this code there.

ionViewDidEnter() {

// select placeholder color
const mycolor= document.querySelectorAll('ion-select');
mycolor.forEach((sel2) => {
sel2.shadowRoot.querySelectorAll('.select-placeholder')
.forEach((elem) => {
elem.setAttribute('style', 'color: red;');
});
});

}