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

Is there a way to change the background color of the DayPilotCalendar1.UpdateWithMessage?

Asked by Patrick
12 years ago.

Is there a way to change the foreground and background color of the message.

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

At this moment, it's only possible when you display the message bar manually using AfterRenderJavaScript [http://api.daypilot.org/daypilot-calendar-afterrender/] and .message() [http://api.daypilot.org/daypilot-calendar-message/].

Example:

1. Server-side code (event handler)

Hashtable ht = new Hashtable();
ht["message"] = "<div style='font-size: 150%;'>Big message</div>";
DayPilotCalendar1.Update(ht);

2. DayPilotCalendar declaration (.aspx)

AfterRenderJavaScript="afterRender(data, isCallBack);"
3. JavaScript code
function afterRender(data, isCallBack) {
  if (data.message) {
    dpc.message(data.message, 10000, "#fff", "#dc143c");
  }
}

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