How to change background color of list page field dynamically based on condition?

I am using phpRAD Vue.
I have list page with field like Datetime. I want to set background color of this field dynamically if the the date is equal to Today. But I can’t do it. Can anyone help me please.


you can bind the class and check for the date
! look up the function that holds the date and
use it to check the date! so maybe you can have your code looking like

<div :class="color_change">{{}}</div>
//in your script in the data object you can add an
 //item called like the one in class


//write code in your mounted method to change
 //the color if date is today eg
 if(datecheckfunction == datetoday){
//note that **datecheckfunction** and  **datetoday** are not the
//actual codes to check for date! you can check how rad does
 //it by editing a default value of date today in rad
   this.color_change = "bg-green";

I have coded like this but it is not working. It always assign

this.color_change = “bg-accent text-white”.

import { date } from 'quasar';
            const timeStamp       =;
            const formattedString = date.formatDate(timeStamp, 'YYYY-MM-DD HH:mm:ss');
             if (this.tentative_withdrawal_date_time ==formattedString){
               this.color_change = "bg-red text-white";
               this.color_change = "bg-accent text-white";

Please help.


Give. Me a scenario of what you are intending on building so i can understand your issue better