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

Click event on resource in Scheduler

Asked by tn
7 years ago.

Is there a way to get an event on right/left clicking a resource in the left pane of the sceduler - where I can get the ID of the clicked resource?

I have my Scheduler:

var dp = $("#dp").daypilotScheduler({
startDate: new DayPilot.Date(getFormattedDate()),
cellGroupBy: "Month",
timeHeaders: [
{ groupBy: "Month", format: "MMM yyyy" },
{ groupBy: "Cell", format: "ddd d" }
],
days: 365,
cellDuration: 1440, // one day
treeEnabled: true
});

And methods like

"dp.onEventMove"

I would like something lin

"dp.onResourceClick" in Javascript.

Answer posted by Thomas
7 years ago.

Got it to work with a contextMenu:

dp.onBeforeResHeaderRender = function (args) {
args.resource.contextMenu = new DayPilot.Menu({
items: [
{
text: "Something",
onclick: function () {
alert("You clicked: " + args.resource.id);
}
}
]
});
};

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