diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 08beb34db0d..9442f14e5db 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -759,32 +759,35 @@ if (empty($action) || $action == 'show_month') // View by month
}
echo " \n";
+ $todayarray=dol_getdate($now,'fast');
+ $todaytms=dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']);
+
// In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month)
//var_dump($eventarray);
//print $tmpday;
- for($iter_week = 0; $iter_week < 6 ; $iter_week++)
+ for ($iter_week = 0; $iter_week < 6 ; $iter_week++)
{
echo "
\n";
- for($iter_day = 0; $iter_day < 7; $iter_day++)
+ for ($iter_day = 0; $iter_day < 7; $iter_day++)
{
/* Show days before the beginning of the current month (previous month) */
- if($tmpday <= 0)
+ if ($tmpday <= 0)
{
- $style='cal_other_month';
+ $style='cal_other_month cal_past';
echo ' | ';
show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
echo " | \n";
}
/* Show days of the current month */
- elseif(($tmpday <= $max_day_in_month))
+ elseif ($tmpday <= $max_day_in_month)
{
$curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year);
$style='cal_current_month';
$today=0;
- $todayarray=dol_getdate($now,'fast');
if ($todayarray['mday']==$tmpday && $todayarray['mon']==$month && $todayarray['year']==$year) $today=1;
if ($today) $style='cal_today';
+ if ($curtime < $todaytms) $style.=' cal_past';
echo ' ';
show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam);
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index a23b70fed0c..e58fccc8b57 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -1876,10 +1876,11 @@ td.hidden {
/* Module agenda */
/* ============================================================================== */
-.cal_other_month { background: #DDDDDD; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
-.cal_past_month { background: #EEEEEE; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
+.cal_other_month { opacity: 0.6; background: #DDDDDD; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
+.cal_past_month { opacity: 0.6; background: #EEEEEE; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_current_month { background: #FFFFFF; border: solid 1px #ACBCBB; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
.cal_today { background: #FFFFFF; border: solid 2px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; }
+.cal_past { }
table.cal_event { border-collapse: collapse; margin-bottom: 1px; -webkit-border-radius: 6px; border-radius: 6px; }
table.cal_event td { border: 0px; padding-: 0px; padding-: 2px; padding-top: 0px; padding-bottom: 0px; }
.cal_event a:link { color: #111111; font-size: 11px; font-weight: normal !important; }
@@ -1888,7 +1889,6 @@ table.cal_event td { border: 0px; padding-: 0px; padding-
.cal_event a:hover { color: #111111; font-size: 11px; font-weight: normal !important; }
-
/* ============================================================================== */
/* Afficher/cacher */
/* ============================================================================== */
|