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

Current time in Scheduler

Asked by Fabien
9 years ago.

Hi,

Is it possible to have a vertical line to display the actual time on the scheduler control?

Answer posted by MaZZly
9 years ago.

I solved this with Seperators (http://doc.daypilot.org/scheduler/separators/)

dp.separators = [{color: "Green", width: 2, location: new DayPilot.Date()}];
dp.update();
setInterval(function () {
dp.separators.pop();
dp.separators = [
{color: "Green", layer: 'above', width: 2, location: new DayPilot.Date()}
];
dp.update();
}, 60*1000) // Update every minute

Comment posted by Anonymous
9 years ago.

Is there a more efficient way to do this? I use a scheduler in with angular and update this every scound.
[code]
$interval(function(){
scope.dp.separators[0].location=new DayPilot.Date();
},1000);
[/code]
Then you see a Loading text every second and after a few minutes it breaks and the page do not react any more.
Is it possible to increase the performance?
Most of all I would like to have an out of the box implementation (Something like a currentTimeSeperator proptery :) ).

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