Bug 12940 - Calendar class behaves differently between Windows with Microsoft .NET and Linux with Mono
Summary: Calendar class behaves differently between Windows with Microsoft .NET and Li...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web ()
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-06-28 10:50 UTC by Chris barr
Modified: 2013-06-28 10:50 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 12940 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Chris barr 2013-06-28 10:50:14 UTC
Mono information
Mono JIT compiler version (Debian
Copyright (C) 2002-2011 Novell, Inc, Xamarin, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none
        Misc:          softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)

Calendars act different when moved from MS.NET to Mono, the fields that are being requested are empty in mono. Specifically the cssclass information.

This is the code that drives the calendar on the page, that is identical to what mono is running.

<asp:Calendar runat="server" ID="resourcesCalendar" ShowNextPrevMonth="true" 
    DayStyle-BorderStyle="Solid" DayStyle-VerticalAlign="Top" DayStyle-HorizontalAlign="Left" Width="100%"
    CssClass="NABORcalendar" WeekendDayStyle-CssClass="weekend" OtherMonthDayStyle-CssClass="otherMonth" 
    DayStyle-CssClass="weekday" TitleStyle-CssClass="title" DayHeaderStyle-CssClass="dayHeader"

protected void resourcesCalendar_DayRender_onMouseover(object sender, DayRenderEventArgs e)

private void calendarInit_enableMouseOver(DayRenderEventArgs e)
    string mouseOutStyle = "this.className='" + e.Cell.CssClass + "'";
    string mouseOverStyle = "this.className='" + e.Cell.CssClass + "Hover'";

    if (displayCalendar)
        e.Cell.Attributes.Add("onmouseover", mouseOverStyle);
        e.Cell.Attributes.Add("onmouseout", mouseOutStyle);

This is the output in Windows.
<td class="weekday" align="left" valign="top" onmouseover="this.className='weekdayHover'" onmouseout="this.className='weekday'" style="border-style:Solid;width:14%;">20</td>

This is the output from mono.
<td class="" align="left" valign="top" onmouseover="this.className='Hover'" onmouseout="this.className=''" style="border-style:Solid;width:14%;">20</td>

Notice that class is missing, and how that missing then cascades to the mouseover events?

What can be done to resolve this issue?