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 (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-28 10:50 UTC by Chris barr
Modified: 2013-06-28 10:50 UTC (History)
1 user (show)

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


Attachments

Description Chris barr 2013-06-28 10:50:14 UTC
Mono information
Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2)
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"
    OnDayRender="resourcesCalendar_DayRender_onMouseover">
</asp:Calendar>

protected void resourcesCalendar_DayRender_onMouseover(object sender, DayRenderEventArgs e)
{
    calendarInit_enableMouseOver(e);
    calendarInit_internalAction1(e);
    calendarInit_internalAction2(e);
}

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

    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?

Note You need to log in before you can comment on or make changes to this bug.