[Mono-bugs] [Bug 49144][Nor] Changed - Calendar bug (DayHeaderStyle) - A fix is provided
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 20 Oct 2003 11:07:37 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by yaronsh@mainsoft.com.
http://bugzilla.ximian.com/show_bug.cgi?id=49144
--- shadow/49144 2003-10-16 11:29:49.000000000 -0400
+++ shadow/49144.tmp.27475 2003-10-20 11:07:37.000000000 -0400
@@ -11,13 +11,13 @@
AssignedTo: mono-bugs@ximian.com
ReportedBy: yaronsh@mainsoft.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Calendar bug (DayHeaderStyle)
+Summary: Calendar bug (DayHeaderStyle) - A fix is provided
Please fill in this template when reporting a bug, unless you know what
you are doing.
Description of Problem:
DayHeaderStyle is not applied to the calendar
@@ -43,6 +43,46 @@
Created an attachment (id=5475)
Testcase
------- Additional Comments From yaronsh@mainsoft.com 2003-10-16 11:29 -------
Anyone? No volunteers? :-)
+
+------- Additional Comments From yaronsh@mainsoft.com 2003-10-20 11:07 -------
+Sorry that I don't have a patch but when I've downloaded the new
+calendar from the CVS the file was full with ^M...
+The bug was that not at all cases the style of DayHeaderStyle was
+assigned to the header cell.
+I wrote a note at the line that fixes it...
+This is the bug fix:
+
+private void RenderHeader (HtmlTextWriter writer,
+ DateTime firstDay,
+ CalendarSelectionMode mode,
+ bool isActive,
+ bool isDownLevel)
+{
+ writer.Write("<tr>");
+ bool isWeekMode = (mode == CalendarSelectionMode.DayWeek ||
+ mode == CalendarSelectionMode.DayWeekMonth);
+
+ TableCell headerCell = new TableCell ();
+ headerCell.HorizontalAlign = HorizontalAlign.Center;
+ string selMthText = String.Empty;
+ if (isWeekMode) {
+ if (mode == CalendarSelectionMode.DayWeekMonth) {
+ headerCell.ApplyStyle (SelectorStyle);
+ selMthText = GetCalendarLinkText ("selectMonth",
+ SelectMonthText, SelectorStyle.ForeColor,
+ isActive);
+ } else {
+ headerCell.ApplyStyle (DayHeaderStyle);
+ selMthText = String.Empty;
+ }
+ RenderCalendarCell (writer, headerCell, selMthText);
+ }
+
+ TableCell dayHeaderCell = new TableCell ();
+ dayHeaderCell.HorizontalAlign = HorizontalAlign.Center;
+ dayHeaderCell.ApplyStyle(dayHeaderStyle); //<-THIS IS THE FIX
+
+ .....