Example of Clipboard in Blazor Scheduler Component
This example demonstrates how to integrate clipboard functionality (cut, copy, paste) and a custom context menu into the Scheduler component.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
In this example, the AllowClipboard
property is set to true
to enable clipboard functionality. This property allows the following keyboard shortcuts:
- Ctrl + X: To cut the selected appointment from the scheduler.
- Ctrl + C: To copy the selected appointment.
- Ctrl + V: To paste the cut/copied appointment.
Additionally, we have integrated the ContextMenu component separately from the application end and set its target to the Scheduler component. Also, we have used the following Scheduler's public methods in the context menu handlers:
- CutAsync() method to remove the selected appointment.
- CopyAsync() method to duplicate the selected appointment.
- PasteAsync() method to insert the appointment into the target time slot.
On mobile devices, the context menu will open when you tap and hold on the cells or events.