AJAX Calendar/Scheduling Controls
Is there way I can change the CSS and styles for month view?
I want to use styles of my website and make the calendar blend with my website theme.
Thanks in advance.
Dan,
Has there been an update to this? I know this post is two years old and we're hoping so! What we are trying to accomplish is a schema where alternative rows (weeks) have different styles applied.
Ken
The CSS support has been added since that time.
You can take a look here:
www.daypilot.org/month-css-class-styling.html
A special class is applied to day cell, cell header (day number), header (days of week), and event. I've added a new mechanism in build 2117 (see the sandbox), that will help you with your task:
protected void DayPilotMonth1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeCellRenderEventArgs e) { e.CssClass = Week.WeekNrISO8601(e.Start)%2 == 0 ? "even" : "odd"; }
But remember to clear the default cell colors (BackColor, NonBusinessBackColor). Otherwise the color set by your CSS will be overriden.
I am trying to set the event back color dynamically. I have the following code in DayPilotMonth1_BeforeEventRender
if (e.Value == "441") { e.BackgroundColor = "#ECFF73";
e.InnerHTML = String.Format
}
That does not seem to work. I confirmed that the event handler was fired becase the InnerHTML tag works. Can you help ?
Is there any way to change the event border color ? For example, instead of doing e.BackgroundColor, I would like to change the BorderColor of each event ?
DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java