Hello,
Prepare a process_record logic_hook.
PHP Code:
class process_record
{
function process_record(&$bean, $event, $arguments)
{
global $timedate;
$today = gmdate($GLOBALS['timedate']->get_db_date_time_format(), time());
$nextday = gmdate($GLOBALS['timedate']->dbDayFormat, time() + 3600*24);
$mergeTime = $bean->date_start; //$timedate->merge_date_time($call_fields['DATE_START'], $call_fields['TIME_START']);
$date_db = $timedate->to_db($mergeTime);
// THE CONDITIONS ARE SAME THAN SUGAR - CHANGE AS PER YOUR REQUIREMENT
if( $date_db < $today){
$bean->date_start= "<span style='color:<OF_YOUR_CHOICE>'>".$bean->date_start."</span>";
}else if($date_db < $nextday){
$bean->date_start = "<span style='color:<OF_YOUR_CHOICE>'>".$bean->date_start."</span>";
}else{
$bean->date_start = "<span style='color:<OF_YOUR_CHOICE>'>".$bean->date_start."</span>";
}
}
}
Bookmarks