Giorgi625 VIP
Total posts: 655
18 Feb 2019 13:49

I have enabled Override record create time in date&time field and I display in that section future records and published(normal) records. Normal records date font is red color by default. Thats ok. But there are several future records. for example one has date 27 february and its date font color is yellow and there is another futur article with date 31 march, and it has blue color font in date. Why two future articles have different colors in date?

PS. I noticed that all february future records have same color but march has different.

Last Modified: 19 Feb 2019


Sergey
Total posts: 13,748
19 Feb 2019 09:27

You can add new class to div for article. You can use condition to compare dates. For that you can do somethign like this

$now = JDate::getInstance();
if ($now->to Unix() < $item->ctime->toUnix()) {
    echo "class='future'"
}
Powered by Cobalt