search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

CSSClass problem in BeforeEventRender Method with Daypilot Calendar

Asked by Eric T
11 years ago.

Hi,

I'm using the calendar and I've got a problem using the CssClass property in BeforeEventRender Method.

In my ASPX page, i've set my calendar like this :

<DayPilot:DayPilotCalendar ID="dpcEmploiDuTemps" runat="server" BusinessBeginsHour="7"
BusinessEndsHour="20" DayBeginsHour="7" DayEndsHour="20" Days="5" EventArrangement="SideBySide"
CssClassPrefix="calendar" CssOnly="true" ClientObjectName="dpcEmploiDuTemps"
DataValueField="NumeroDeroulement" DataStartField="Debut" DataEndField="Fin"
DataTextField="NomActivite" DataAllDayField="JourneeEntiere"
DataTagFields=""
ShowAllDayEvents="True"
HeightSpec="Full">
</DayPilot:DayPilotCalendar>

In my css file, I do'nt have any "calendar_allevent_inner" class (I want to set it during BeforeEventRender because this style can be changed)

In my BeforeEventRender Method, I set my cssclass like this
e.CssClass = "calendar_event_alldayevent_inner_session"

but, when I look at my calendar, there is no CSS applied to my AllDayEvent. If I do the same thing for a simple event, it works fine.

In my HTML code, my class is not applied on my event :
<div title="" class="calendar_alldayevent" style="left: 0%; top: 21px; width: 20%; height: 50px; text-align: left; line-height: 1.2; position: absolute;" unselectable="on">

Thanks for your help,
King regards,

Comment posted by Eric T
11 years ago.

I'm using version 7.1.2725.0

Comment posted by David F
11 years ago.

Encountering the same problem with cell rendering - the class name is added to the v.cellProperties in the _Init() method but not the element.

Answer posted by David F
11 years ago.

The class is added to the element if CssOnly="False" is set on the DayPilot:DayPilotCalendar but not of CssOnly="True"

I've figured this workaround: modify the InnerHtml to add a marker div then add the class to the element on the client.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.