The onCardMoving event is fired in real time whenever the Kanban card event shadow is moved to another position during drag & drop event moving.
You can use onCardMoving to customize the behavior when moving a card: to implement custom rules (e.g., forbid selected target locations), and display feedback during the process.
Available since version 2025.2.6514.
DayPilot.Kanban.onCardMoving(args);args.allowed - boolean value that determines whether it is possible to drop the event at this location
args.ctrl - Ctrl key pressed (boolean)
args.shift - Shift key pressed (boolean)
args.meta - Meta key pressed (boolean)
args.alt - Alt key pressed (boolean)
args.cssClass - CSS class to be added to the shadow
args.card - card object
args.column - target column
args.external - true if the event comes from an external source
args.html - HTML of the shadow object (since 8.3.2589)
args.position - position index inside a cell
args.left.html - HTML of the indicator displayed on the left
args.left.enabled - when set to true, the inline indicator is displayed
args.right.html - HTML of the indicator displayed on the right
args.right.enabled - when set to true, the inline end indicator is displayed
args.swimlane - target swimlane
onCardMoving: args => {
args.right.enabled = true;
args.right.html = "Move to column: " + args.column.data.name + ", " + args.position;
args.left.enabled = true;
args.left.html = "Move to column: " + args.column.data.name + ", " + args.position;
}