Home Unanswered Active Tags New Question

Weeknumbers

Is it possibel to show weeknumbers in the Calendar?

ex: a good place would be the top-left-corner above the hours

Asked by Jø¸rn Mortensen 3 years ago.
Replies

You can render your own HTML in the upper-left corner using BeforeHeaderRender event handler. Detect e.IsCorner and change e.InnerHTML.

An example from Demo/Calendar/Default.aspx.cs:

protected void DayPilotCalendar1_BeforeHeaderRender(object sender, BeforeHeaderRenderEventArgs e)
{
 if (e.IsCorner)
 {
    // NOTE: this doesn't get updated if the date is changed using Refresh callback
  e.InnerHTML = String.Format("<div style='padding:2px; text-align:center; font-weight: bold;'>{0}</div>",
 DayPilotCalendar1.StartDate.Year); 
 }
}

Comment posted by Dan Letecky 3 years ago.
New Reply
This reply is
Your name (optional):

DayPilot for ASP.NET WebForms, DayPilot for ASP.NET MVC, DayPilot for Java