Yes. You can try something like this:
contextMenuCard: new DayPilot.Menu({
items: [
{
text: "Edit...", onClick: async (args) =>{
const card = args.source;
const form = [
{id: "name", name: "Name", type: "text"},
{id: "text", name: "Description", type: "textarea"}
];
const modal = await DayPilot.Modal.form(form, card.data);
if (modal.canceled) {
return;
}
card.data.name = modal.result.name;
card.data.text = modal.result.text;
kanban.cards.update(card);
}
},
{text: "-"},
{
text: "Delete", onClick: (args) => {
kanban.cards.remove(args.source);
}
}
]
})
If you don’t have the Card object for some reason, you get get it using cards.find(id):
const card = kanban.cards.find(1);
card.data.name = "Task 1";
kanban.cards.update(card);