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
m 10m 10 

how to write if condition for disabled in lightning component

 <ui:InputTextArea value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes" disabled="{!v.isDisabled == false}" />
                            
                           
 <ui:InputText value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes1" disabled="{!v.isDisabled == True}" />
                            
Maharajan CMaharajan C
Hi,

Try the bwlow way:

<aura:attrribute type="boolean" name="isDisabled " default="false" />

<ui:InputTextArea value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes" disabled="{!!v.isDisabled}" />       
                           
 <ui:InputText value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes1" disabled="{!v.isDisabled}" />

Thanks,
Maharajan.C
Danish HodaDanish Hoda
Hi there,

<ui:InputTextArea value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes" disabled="{!!v.isDisabled}" />       
                           
 <ui:InputTextArea value="{!mon.MonthDescription}" class="vw_Plan_blu_bodr" aura:id = "Testdes1" disabled="{!v.isDisabled}" />
m 10m 10
if it is previous month mean need to display "InputText area" for current year need to display only "
Inputtext"