Welcome Guest Search | Active Topics | Sign In | Register

Calendar OnDayRender event inconsistently fired Options
Mike Butler
Posted: Monday, November 26, 2007 7:31:44 AM
Rank: Newbie
Groups: Member

Joined: 11/26/2007
Posts: 2
I'm trying to use a Calendar object formated with "style 2" and handle the OnDayRender event. The event fires when the control is initially rendered but will not fire when the user changes months.

I've tried this with a Calendar object formatted with the "sheduler" style and it works - the event fires consistently.

Is there something I need to do/edit on the <TitleTemplate> for the "style2" formatted object to get the events wired up correctly?

I'm including the text of the 2 control instances from my research - When the user changes month Calendar 1 does not fire OnDayChanged()- Calendar 2 does:

<eo:Calendar ID="Calendar1" runat="server" ControlSkinID="None" CssBlock='&#13;&#10;<style type="text/css">&#13;&#10; a.eo_calendar_style1_title_button &#13;&#10; { &#13;&#10; width: 21px;&#13;&#10; height: 17px;&#13;&#10; border-right: #f3f3f3 1px solid; &#13;&#10; border-top: #f3f3f3 1px solid; &#13;&#10; border-left: #f3f3f3 1px solid; &#13;&#10; border-bottom: #f3f3f3 1px solid; &#13;&#10; background-color: transparent; &#13;&#10; } &#13;&#10; &#13;&#10; a.eo_calendar_style1_title_button:hover &#13;&#10; { &#13;&#10; width: 21px;&#13;&#10; height: 17px;&#13;&#10; border-right: #0044ff 1px solid; &#13;&#10; border-top: #0044ff 1px solid; &#13;&#10; border-left: #0044ff 1px solid; &#13;&#10; border-bottom: #0044ff 1px solid; &#13;&#10; background-color: #aaaaff &#13;&#10; } &#13;&#10;</style>&#13;&#10;' DayCellHeight="14" DayCellWidth="22" DisabledDates="" DisableWeekendDays="True" SelectedDates="" VisibleDate="2007-11-01" OnDayRender="Calendar1_DayRender">
<DisabledDayStyle CssText="font-family: verdana; font-size: 8pt; border-bottom-color:#CFD9C0;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#CFD9C0;border-left-style:solid;border-left-width:1px;border-right-color:#CFD9C0;border-right-style:solid;border-right-width:1px;border-top-color:#CFD9C0;border-top-style:solid;border-top-width:1px;color:gray;" />
<SelectedDayStyle CssText="font-family: verdana; font-size: 8pt; background-color:White;border-bottom-color:Black;border-bottom-style:solid;border-bottom-width:1px;border-left-color:Black;border-left-style:solid;border-left-width:1px;border-right-color:Black;border-right-style:solid;border-right-width:1px;border-top-color:Black;border-top-style:solid;border-top-width:1px;" />
<DayStyle CssText="font-family: verdana; font-size: 8pt; border-bottom-color:#CFD9C0;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#CFD9C0;border-left-style:solid;border-left-width:1px;border-right-color:#CFD9C0;border-right-style:solid;border-right-width:1px;border-top-color:#CFD9C0;border-top-style:solid;border-top-width:1px;" />
<MonthStyle CssText="background-color: #cfd9c0; cursor: hand;" />
<CalendarStyle CssText="border-right: #555566 1px solid; border-top: #555566 1px solid; border-left: #555566 1px solid; border-bottom: #555566 1px solid; background-color: #ebe9ed" />
<DayHoverStyle CssText="font-family: verdana; font-size: 8pt; border-right: #bbbbbb 1px solid; border-top: #bbbbbb 1px solid; border-left: #bbbbbb 1px solid; border-bottom: #bbbbbb 1px solid; background-color: #ddeeff" />
<TitleTemplate>
<table width="100%" border="0" cellSpacing="0" cellPadding="0"
style="background-color:#f3f3f3;font-size: 11px; font-family: verdana; ">
<tr>
<!-- Previous Year -->
<td>
<a href="javascript: void {var:this}.goTo(-12);" class="eo_calendar_style1_title_button">
<img src="{img:00040302}" border=0/>
</a>
</td>

<!-- Previous Month -->
<td>
<a href="javascript: void {var:this}.goTo(-1);" class="eo_calendar_style1_title_button">
<img src="{img:00040301}" border=0/>
</a>
</td>

<!-- Current Month -->
<td width="99%" align="center">
{var:visible_date:MMM - yy}
</td>

<!-- Next Month -->
<td>
<a href="javascript: void {var:this}.goTo(1);" class="eo_calendar_style1_title_button">
<img src="{img:00040303}" border="0"/>
</a>
</td>

<!-- Next Year -->
<td>
<a href="javascript: void {var:this}.goTo(12);" class="eo_calendar_style1_title_button">
<img src="{img:00040304}" border="0"/>
</a>
</td>
</tr>
</table></TitleTemplate>
<DayHeaderStyle CssText="font-weight: bold; font-size: 11px; color: black; border-bottom: #555566 1px solid; font-family: verdana; background-color: #ae9c86" />
</eo:Calendar>

<eo:Calendar ID="Calendar2" runat="server" ControlSkinID="None" DayCellHeight="60" DayCellWidth="80" DayHeaderFormat="Full" DisabledDates="" GridLineColor="207, 217, 227" GridLineFrameVisible="False" GridLineVisible="True" SelectedDates="" TitleFormat="MMMM, yyyy" TitleLeftArrowHtml="&lt;" TitleRightArrowHtml="&gt;" VisibleDate="2007-11-01" OnDayRender="Calendar1_DayRender">
<DayStyle CssText="font-size: 11px; font-family: verdana;border-right: #eaeaea 1px solid; border-top: #eaeaea 1px solid; border-left: #eaeaea 1px solid; border-bottom: #eaeaea 1px solid; background-color: #eaeaea; text-align: right;" />
<CalendarStyle CssText="border-right: #cfd9e3 1px solid; border-top: #cfd9e3 1px solid; font-size: 11px; border-left: #cfd9e3 1px solid; cursor: hand; border-bottom: #cfd9e3 1px solid; font-family: verdana; background-color: #eaeaea" />
<DayHoverStyle CssText="font-size: 11px; font-family: verdana;background-color:#DADADA;border-bottom-color:#DADADA;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#DADADA;border-left-style:solid;border-left-width:1px;border-right-color:#DADADA;border-right-style:solid;border-right-width:1px;border-top-color:#DADADA;border-top-style:solid;border-top-width:1px;text-align:right;" />
<TitleStyle CssText="padding-right: 3px; padding-left: 3px; font-weight: bold; padding-bottom: 3px; color: white; padding-top: 3px; border-bottom: #cfd9e3 1px solid; background-color: #006699; font-size: 11px; font-family: verdana;" />
<DayHeaderStyle CssText="font-size: 11px; font-family: verdana;height: 17px" />
</eo:Calendar>
eo_support
Posted: Monday, November 26, 2007 7:45:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,086
Hi,

You need to set AutoPostBackOnScroll to true. That way every time you change month, the Calendar will be re-rendered on the server side. Unless the Calendar is re-rendered on the server side, DayRender event will not be called.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.