I have a table with a column full of dates. I'd like to change the background color to red if the date is more than a month old, otherwise keep it white.
I know I can do inline stuff like
{{ moment() - new Date(self) > 30 * (24*60*60*1000) ? 'red' : 'white' }}
but as you can tell this is messy and hard to debug.
So I tried to create a new JS query and reference {{query1.value}} in the column's background color property but it doesn't seem to be working.
The query is trying to reference the variable i to get the current row but I can't seem to figure out how to get the current cell of the current row.
Kind of at a loss here, any help would be appreciated. Thanks