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

Issue "TypeError: e.copy is not a function [Learn More] daypilot-all-pro.min.js"

Asked by Thomas Lee
6 years ago.

Hi Daypilot,
I'm using Daypilot Scheduler for my project and I have the little problem as I mention on Subject.
I'm trying to update the Event client data , my code is
e.text = 'Matching...';
dp.events.update(e).queue(); < this is the problem line

and I got the error like Subject.
What is wrong with my code?

Could you give me some advice?
Thank you,
Thomas.

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

The dp.events.update() method (https://api.daypilot.org/daypilot-scheduler-events-update/) requires a DayPilot.Event object (https://api.daypilot.org/daypilot-event-class/) as a parameter.

You can get DayPilot.Event using dp.events.find() or from the args in event handlers (e.g. args.e in onEventMove).

You can also create it from the data object (which seems to be "e" in your example):

e.text = 'Matching...'; 
dp.events.update(new DayPilot.Event(e));
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.