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

Does HourHalfBorderColor still works in new Calendar version ?

Asked by Philippe
5 years ago.

I test the upgrade from an older version and with the new one, the "HourHalfBorderColor" property seems like not working : half hour <div> seems not to be generated.
Even I set it a color, even with the "CssOnly = false".
But it's writen "DayPilot Pro 8.0 and later versions only support CssOnly=true mode." in this page :

Is it possible to have different color for half hour line than hour line ?

Best regards

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

This property is obsolete now when CssOnly="false" mode is not supported anymore.

However, you can achieve this effect using CSS. The border is defined using a cell class. The default style ("calendar_default" theme) looks like this:

.calendar_default_cell_inner { position: absolute;top: 0px;left: 0px;bottom: 0px;right: 0px;border-right: 1px solid #ddd;border-bottom: 1px solid #ddd; background: #f9f9f9; }

Note the "border-bottom" style.

You can use BeforeCellRender to add a custom class to cells that separate cells inside an hour block:

protected void DayPilotCalendar1_BeforeCellRender(object sender, BeforeCellRenderEventArgs e)
  if (e.End.Minute > 0)
      e.CssClass = "intrahour";
Then define the color using CSS:
    .intrahour .calendar_default_cell_inner {
        border-bottom: 1px solid red;
Answer posted by Philippe
5 years ago.

thank you for answer.
It works, great once more.

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