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

onClick should be onclick....

Related article: HTML5 Scheduler: Splitting an Event
Asked by arthur konrath
5 years ago.

that would be the code that work

{text: "Split", onclick: function(args) {
var time = dp.getDate(dp.coords.x, !elements.snap.checked);
var e = args.target.source;
var originalEnd = e.end();

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

Just a quick background explanation:

The "onclick" event has been replaced by "onClick" in version 8.3.2617:
https://javascript.daypilot.org/daypilot-pro-for-javascript-8-3-sp6/

The new onClick event uses standard DayPilot args object as an argument (to make it compatible with other DayPilot events), while onclick uses the JavaScript behavior (it's invoked on the source menu item object).

If you are using an older version, "onClick" may not be available. (The sample project includes DayPilot Pro version 2018.2.3324.)

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