From 4769f19ccda98fd11ff4e41207213ec93b641f6b Mon Sep 17 00:00:00 2001 From: Jason Fowler Date: Fri, 24 Aug 2012 10:10:55 +0800 Subject: [PATCH] MDL-31824 - Calendar - Fixing HTML classes fopr calendar month view - patch provided by Mark Ward --- calendar/renderer.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/calendar/renderer.php b/calendar/renderer.php index 396e91d9c18..f3404c6861b 100644 --- a/calendar/renderer.php +++ b/calendar/renderer.php @@ -460,7 +460,7 @@ class core_calendar_renderer extends plugin_renderer_base { // Paddding (the first week may have blank days in the beginning) for($i = $display->minwday; $i < $startwday; ++$i) { $cell = new html_table_cell(' '); - $cell->attributes = array('class'=>'nottoday'); + $cell->attributes = array('class'=>'nottoday dayblank'); $row->cells[] = $cell; } @@ -519,10 +519,10 @@ class core_calendar_renderer extends plugin_renderer_base { } // Special visual fx for today - if($display->thismonth && $calendar->day == $calendar->day) { - $cellclasses[] = 'today'; + if ($display->thismonth && $calendar->day == $date['mday']) { + $cellclasses[] = 'day today'; } else { - $cellclasses[] = 'nottoday'; + $cellclasses[] = 'day nottoday'; } $cell->attributes = array('class'=>join(' ',$cellclasses)); @@ -553,7 +553,7 @@ class core_calendar_renderer extends plugin_renderer_base { // Paddding (the last week may have blank days at the end) for($i = $dayweek; $i <= $display->maxwday; ++$i) { $cell = new html_table_cell(' '); - $cell->attributes = array('class'=>'nottoday'); + $cell->attributes = array('class'=>'nottoday dayblank'); $row->cells[] = $cell; } $table->data[] = $row;