![]() Use the onEventCreate and onEventCreateFailed for triggering a custom logic on drop like showing a toast. Learn more from the external drag & drop documentation. For a more programmatic approach you might want to use the component initialization where the draggable is initialized in js code and the dragData can be passed as an object. If omitted, a default event will be created. This will be added to the event calendar on drop. Pass a skeleton event definition through the data-drag-data attribute as a stingified json object. Set up a container as draggable with the mbsc-draggable attribute. Initialize the external events (containers) as draggable components.Enable the calendar to receive external events by setting externalDrop to true.In order for that to work you will need to have two things set up: If you're interested in invalids for a given range (including recurring occurrences), you can use the getInvalids function.Įvents can be created and scheduled by dragging and dropping an external resource onto the calendar. 'start-end' - With start-end validation the calendar checks if the start or end of the event coincides with any invalid range. ![]() 'strict' - Strict being the default, no event overlap is allowed with invalid ranges.The built-in logic of how the calendar handles validation on user interaction can be controlled through the invalidateEvent option: When dragging events onto disabled days, they will automatically be denied andĮvents will be triggered, from which custom logic can be executed to show a toast or maybe a modal for data correction. To disable weekends, use the recurring object - recurring:.To disable specific or recurring days you can pass an array to the invalid option. This means if you would like to add opacity, override the mouse cursor or apply any other CSS override, you can add it to this class.Įntire days and ranges can blocked out to manage event creation and editing more efficiently. The mbsc-event-readonly CSS class will be added to the events. This turns delete, drag & drop move and resize off for the event. You have granular control over features through theĮventDelete options, which are false by default.Įvents can be marked as fixed by setting their editable property to false. Delete events - pressing the Delete or Backspace keys on the keyboard will delete the focused event. ![]() Resize events - change the length of en event, grab it from either end and resize it.Move events - grab an event and move it wherever needed.Drag to create events - tap/click to start creating an event and drag to the desired length. ![]() This can be turned off or set to single click
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |