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
10 years ago.

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

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

At this moment, it's only possible when you display the message bar manually using AfterRenderJavaScript [] and .message() [].


1. Server-side code (event handler)

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

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 3 months old and has been closed. Please create a new question if you have anything to add.