Changing the color of a button if it is disabled
Posted: 06 May 2021, 12:26
Hi Guys,
I am using Rain theme. I would like to change the color of my button if it disabled.
I would like to change the color of the button to light grey if it is disabled. If it is not disabled it is red.
Can please someone tell me how to do that?
<p:commandButton id="cancelButton"
value="#{msg['prod.cancel']}"
icon="fas fa-undo" styleClass="danger-button p-mr-2"
style="width:auto;" ajax="true" update="update"
actionListener="#{cancelProd}"
disabled="#{!prod.isCancelable()}">
<p:confirm
...etc>
</p:commandButton>
Many thanks and best regards,
Krisztyan
Primefaces version: 8.0.4
Rain theme: 1.0.0
I am using Rain theme. I would like to change the color of my button if it disabled.
I would like to change the color of the button to light grey if it is disabled. If it is not disabled it is red.
Can please someone tell me how to do that?
<p:commandButton id="cancelButton"
value="#{msg['prod.cancel']}"
icon="fas fa-undo" styleClass="danger-button p-mr-2"
style="width:auto;" ajax="true" update="update"
actionListener="#{cancelProd}"
disabled="#{!prod.isCancelable()}">
<p:confirm
...etc>
</p:commandButton>
Many thanks and best regards,
Krisztyan
Primefaces version: 8.0.4
Rain theme: 1.0.0