color a datatable using date

Asked

Viewed 57 times

0

I’m just testing, I want to leave the source red if the date is less than or equal to today

but nothing is happening tried with '2017-02-21' '21/02/2017' and does not work

my css:

.vermelho {
    color: red;
}

my datatable:

<p:inputMask value="#{con.vencimento}" style="width:96%"
                            rowStyleClass="#{con.vencimento le '2017-02-21' ? 'vermelho' : null}"                           
                                mask="99/99/9999" label="vencimento">
                                <f:convertDateTime pattern="dd/MM/yyyy" />
  • Instead of using the rowStyleClass. Try to use the styleClass.

  • Another question: What is the value of con.vencimento?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.