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

Custom Time Header and Tooltip in Scheduler

Asked by Doug Odegaard
8 years ago.

I am using AngularJS working with the Scheduler. I have a requirement to show a custom indicator (color, symbol, etc) and a tooltip if a "note" or data exists for that particular date. It appears that onBeforeTimeHeaderRender can do it on the first load with code like the following but how can it then be refreshed since part of the .config?

onBeforeTimeHeaderRender: function (args) {
// place a GET call here to get data based on scheduler position but hardcoded below for testing
if (args.header.start === new DayPilot.Date(2016, 1, 6)) {
args.header.toolTip = 'hello';
args.header.backColor = "#F3F781";
}

Thanks.

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

You can force a reload of the scheduler by calling .update():

http://api.daypilot.org/daypilot-scheduler-update/

With the progressive rendering options enabled (they are enabled by default) it is a relatively fast and cheap action. It is also used to redraw the scheduler when the config change is detected by angular.

Just note that an AJAX call invoked from onBeforeTimeHeaderRender can kill your application - this event is fired for every cell in the time header. The data should be loaded already before calling .update() so the onBeforeTimeHeaderRender can run fast.

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