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

Change Calendar Gridline Color and Width

Asked by Jenny
10 years ago.

Hi,

I'm using the Timetable Example.

is it possible to change the gridline or separation between the hours and blocks so that it looks something like the attached?

I have tried _matrix_horizontal_line which worked for Scheduler but doesn't appear to work for the Calendar.

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

I've posted a short tutorial that demonstrates how to modify the CSS theme for the timetable tutorial:

http://code.daypilot.org/39902/asp-net-timetable-with-custom-css-theme

Instead of the _matrix classes, the Calendar control uses borders on the *_inner elements.

Every cell uses an outer and inner div.

  • The outer div has fixed dimensions and position set by the calendar.
  • The inner div has no inner styles applied.

The themes apply position:absolute and left, right, top, and bottom CSS styles to the inner div to stretch it to the parent size. This way you don't need to know the parent dimensions (so the theme is universal) and you can add borders of any width (the increased with doesn't change the outer div dimensions).

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