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

Scheduler under Angular

Asked by Matthew
4 years ago.


I'm evaluating the demo scheduler and I can't get the basic example to work. Further to the problem, I can't see the "dp" (the element's id is dp as per the tutorial) object on the scope as expected. Any ideas?

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

1. What kind of problem do you have? Is there any error message in the JavaScript console?

2. There is a also special tutorial on using the Scheduler with AngularJS:

It includes a sample project (with PHP backend) for download.

Comment posted by Matthew
4 years ago.

Thanks for the swift reply

I have something like:

$scope.config = {
scale: "Hour",
days: 1,
startDate: new,
timeHeaders: [
{ groupBy: "Day" },
{ groupBy: "Hour", format: "HH" }
resources: [
{ name: "ALAN McCULLOCH", id: 823 },
{ name: "ALAN TOOGOOD", id: 806 },
{ name: "ALPHATRUCK", id: 843 },
{ name: "ANDREW MILLER", id: 847 }

$ = [
start: new DayPilot.Date("2016-02-23T00:09:00"),
end: new DayPilot.Date("2016-02-23T00:10:00"),
id: DayPilot.guid(),
resource: 806,
text: "All Day Inspection"

$scope.add = function() {
start: new DayPilot.Date("2016-02-23T11:00:00"),
end: new DayPilot.Date("2016-02-23T12:00:00"),
id: DayPilot.guid(),
resource: 843,
text: "Training Job"

My html element is:

  • scheduler id="dp" daypilot-config="config" daypilot-events="jobs"></daypilot-scheduler>

I get no errors in the console and my grid loads nicely with the users on the left and the hours along the top but the events specified in $ never load (I can evalaute them with {{jobs}} and they're there).

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

This turned out to be a bug of the latest version - since the introduction of "events" attribute it fails to recognize "daypilot-events". It's now fixed in the latest sandbox build (8.2.2072):

With the current version you can change daypilot-events="jobs" attribute to events="jobs" as a workaround.

Let me know if it didn't help.

Comment posted by Matthew
4 years ago.

Thank you, that fixed it

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