function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Laurie DrewLaurie Drew 

Lightning Components Basics - ui:inputDate field -How do I change the color of the label?

I have found a way through CSS to change the colour of the label for all of my <lightning:input> fields using the code below:

.THIS label.slds-form-element__label{
    
    font-size: 1.00rem;
    color: blue;
}

but I have 2 fields that are <ui:inputDate> fields, how do I change the colour of their label?

User-added image

Here is the code for the Purchase Date field:

<ui:inputDate aura:id="PurchaseDate" label="Purchase Date" class="field" value="{!v.AcctForm.PurchaseDate__c}" displayDatePicker="true" /> 

Thank you in advance for any assitance you can provide.
Best Answer chosen by Laurie Drew
Deepali KulshresthaDeepali Kulshrestha
Hi Laurie,
Greetings to you!


- Use the below code and CSS from "ui:inputDate" . 
 
<ui:inputDate aura:id="PurchaseDate" label="Purchase Date" value="{!v.AcctForm.PurchaseDate__c}" displayDatePicker="true" />

CSS : - 

    .THIS .uiLabel {
        font-size: 1.00rem !important;
        color: blue !important;
    }
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha.