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

Giving a custom color to a Calendar message in Angular

Asked by Stef
3 years ago.

I try to customize the color of both the text and background of the message bars in DayPilot Angular Pro.

The default message structure (which works fine) looks like this:
this.calendar.control.message('Welcome!");

Based on the following page (https://api.daypilot.org/daypilot-calendar-message/), I expect that it would be possible to change the color of both the text and the background as follows:
this.calendar.control.message("Welcome!", 5000, "#fff", "#dc143c");

However, then the following error is encountered: Expected 1-2 arguments, but got 4.

I also tried to an alternative based on the DayPilot Scheduler, as follows:
this.calendar.control.message('Welcome', {delay: 5000, cssClass: 'welcome-msg'})
However, it seems the CSS class is not given to the message bar.

Am I missing something?

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

This was not implemented in the Calendar component but it's now available in the latest sandbox build (2021.1.4923):

this.calendar.control.message('Welcome', {delay: 5000, cssClass: 'welcome-msg'});

The API documentation is now updated.

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