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

Howto use a theme

Asked by Patrick
12 years ago.

Hello

Is there a small tutorial how u use a css theme in scheduler.
It is in the demo but i didnt understand it (due to inexperience).

I got the scheduler to work with a mysqldatabase.

Thanks for the help.

Patrick

Answer posted by Dan Letecky [DayPilot]
12 years ago.

You need to to include the .css file:

  <link type="text/css" href='Themes/scheduler_white.css' rel="stylesheet" />    

Enable CssOnly and specify the class prefix:

<DayPilot:DayPilotScheduler 
  ...        
  CssClassPrefix="scheduler_white"
  CssOnly="true"
  ...
</DayPilot:DayPilotScheduler>

Comment posted by Patrick
12 years ago.

Thanks for the help.

In the tradidional theme the weekends are marked in a little darker color.
Is that possible when using a CSS theme?

Patrick

Comment posted by Dan Letecky [DayPilot]
12 years ago.

This is not done out of the box for the CssOnly mode.

You can add your own class to the background cell using BeforeCellRender event handler:

protected void DayPilotScheduler1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.BeforeCellRenderEventArgs e)
{
  if (e.Start.DayOfWeek == DayOfWeek.Saturday || e.Start.DayOfWeek == DayOfWeek.Sunday)
  {
    e.CssClass = "scheduler_green_cellweekend";
  }
}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.