This topic is locked

check date and change field color

10/24/2008 6:06:20 AM
PHPRunner General questions
scuba author

I have a start date and end date. I would like the end date field to change color when the date is reached. Something like
if end-date is now-date, change field color to red.
I remember a post on that issue but I can't find it anymore.
thanks in advance!!

J
Jane 10/24/2008

Hi,
use custom format on the "View as" settingsdialog on theVisual Editor tab.

if (date("Y-m-d",strtotime($value))==date("Y-m-d"))

$value = "<font color=red>".$value."</font>";