Add Class To Table Rows Based on Date

Add Class To Table Rows Based on Date

baddubbaddub Posts: 1Questions: 1Answers: 0

I have a table and the first column holds a date. Is there any way to add a class to show separation on based on the dates? For example three rows for todays date would have a highlight class. Then the next four rows were for yesterdays date they would have to class, then the next row is for 2 days ago and would have the highlight class.

Just a simple way too separate out the rows based on the day. Making it more readable.

Answers

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin

    Sure - use createdRow to use some Javascript logic to modify the row (i.e. check the date and add a class as required).

    Allan

This discussion has been closed.