0

I have a Lightning Web Component (LWC) with a Lightning Data Table that displays data, including a date column. I want to change the border color of the date column to red if the date has passed.

I tried using conditional formatting by setting the cellAttributes property for the date column, but it does not work, i am able to change the text color but the border is not coming.

Is there a way to achieve this in LWC? Any help would be appreciated.

enter image description here

1

1 Answer 1

1

Yes you can do that using LoadStyle

Repo Link :

https://github.com/karykaran/DataTableCssDemo.git

You can add your own condition to show border.I hope that will work for you

Result :

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .