Customize invalid dropdownlist

Hi,

i am trying to customize my invalid dropdownlinst. I couldn't find any CSS classes which change the color of the placeholder and the floating label (auto) when it is invalid.


the floating label should have the color #dc3545 the placeholder also.




1 Reply

PM Ponmani Murugaiyan Syncfusion Team March 8, 2022 07:14 AM UTC

Hi Barbara, 

We have override the CSS for the placeholder and float label color as per your requirement. 

<style> 
    /*Placeholder*/ 
    .e-input-group.e-error input.e-dropdownlist::placeholder { 
        color: #dc3545; 
    } 
 
    /*Placeholder with floatlabeltype auto or always*/ 
    .e-float-input.e-error label.e-float-text, 
    .e-float-input.e-control-wrapper.e-error label.e-float-text, 
    .e-float-input.e-error input:focus ~ label.e-float-text, 
    .e-float-input.e-control-wrapper.e-error input:focus ~ label.e-float-text, 
    .e-float-input.e-error.e-input-focus input ~ label.e-float-text, 
    .e-float-input.e-control-wrapper.e-error.e-input-focus input ~ label.e-float-text, 
    .e-float-input.e-error textarea:focus ~ label.e-float-text, .e-float-input.e-control-wrapper.e-error textarea:focus ~ label.e-float-text { 
        color: #dc3545; 
    } 
</style> 

Regards, 
Ponmani M 


Loader.
Up arrow icon