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

How to change message color (angular)

Asked by Olivier
7 years ago.

Hi
We tried to use dp.message with custom color / backcolor and it seems not to work...
Perhaps another angular-specific issue ?

Thank's for your help
Best regards

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

Sorry for the confusion. The documentation on .message() was out-of-date. The current syntax allows you to pass additional properties using "options" object like this:

dp.message("Test", { cssClass: "custom_message"});

The "cssClass" option applies custom CSS class to this particular message.

.scheduler_default_message.custom_message {
  background: red;
  color: white;
}

See also:
https://api.daypilot.org/daypilot-scheduler-message/

Comment posted by Olivier
7 years ago.

Thank's for your answer, We will try this.

Comment posted by blalond
7 years ago.

I confirm that this doesn't work with Scheduler build 2282.
But this does work: dp.message("Test", 5000);
And this doesn't work but I wish that it did: dp.message("Test", {delay:5000, cssClass: "custom_message"});

Comment posted by Dan Letecky [DayPilot]
7 years ago.

There is a bug in the latest release (build 2279) - the Scheduler doesn't clear the previously used CSS classes.

It should be fixed in the latest sandbox build (2306):

http://javascript.daypilot.org/sandbox/scheduler/

I've tested this dp.message() call in the console and it seems to work fine:

dp.message("Test", {delay:5000, cssClass: "custom_message"});

Let me know if the problem persists.

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