The onCardMoved event handler fires when the user finishes moving a card and the card has already been moved to the target position.
DayPilot.Kanban.onCardMoved(args)args.card (DayPilot.Card object) - moved card
args.column (DayPilot.Column object) - target column
args.control (DayPilot.Kanban) - control instance
args.position (integer) - position inside the destination cell
args.previous (DayPilot.Card object) - card preceding the target position
args.next (DayPilot.Card object) - card following the target position
args.swimlane (DayPilot.Swimlane object) - target swimlane
This handler runs after the default drop action configured by DayPilot.Kanban.cardMoveHandling updates the card location. Use DayPilot.Kanban.onCardMove if you need to validate or cancel the move before it is applied.
The source data object is accessible as args.card.data.
JavaScript
const dp = new DayPilot.Kanban("dp", {
cardMoveHandling: "Update",
onCardMoved: (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
},
// ...
});
dp.init();Angular
<daypilot-kanban [config]="config"></daypilot-kanban>config: DayPilot.KanbanConfig = {
cardMoveHandling: "Update",
onCardMoved: (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
},
// ...
};React
<DayPilotKanban
cardMoveHandling="Update"
onCardMoved={onCardMoved}
{/* ... */}
/>const onCardMoved = (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
};Vue
<DayPilotKanban
cardMoveHandling="Update"
@cardMoved="onCardMoved"
<!-- ... -->
/>const onCardMoved = (args) => {
args.control.message("Card " + args.card.data.id + " moved.");
};