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

How to update event text value after click on a button.

Asked by Vinay Kumar
10 days ago.

I need to update the event text after rendering the event on scheduler. I want to update the text on condition.

Answer posted by Dan Letecky [DayPilot]
9 days ago.

You need to get the DayPilot.Event instance first using events.find(). Then you can update the event using events.update().

const dp = this.scheduler.control;
const e = dp.events.find("1");
e.data.text = "new text";
dp.events.update(e);

See also:
https://api.daypilot.org/daypilot-scheduler-events-find/
https://api.daypilot.org/daypilot-scheduler-events-update/

If you use the [events] attribute you can simply change the event properties in the source array and the Scheduler will be updated automatically. But you should know that using the [events] affects performance:
https://doc.daypilot.org/scheduler/angular-performance/

New Reply
This reply is
Your name (optional):