Instance Event Transfer

There are certain cases when moving the events between calendars can come in handy.

Dragging and dropping events between two scheduler instances can be enabled by turning on the externalDrag and externalDrop options.

Get started with this example

Demo

Loading the live demo

Preview in full screen

Drag and drop events between two Scheduler instances — reassign appointments, tasks, or shifts across separate weekly views.

Code

<script setup>
import {
  MbscEventcalendar,
  MbscPage,
  MbscToast,
  setOptions 
} from '@mobiscroll/vue'
import { ref } from 'vue'

setOptions({
  locale:  ,
  theme: ' ',
  themeVariant: ' '
})

const myView = {
  scheduler: { type: 'week' }
}

const firstEvents = ref([
  {
    start: '2026-10-25T10:00',
    end: '2026-10-25T14:00',
    title: 'Event 1',
    color: '#de3d83'
  },
  {
    start: '2026-10-26T07:00',
    end: '2026-10-26T08:00',
    title: 'Event 2',
    color: '#6e7f29'
  },
  {
    start: '2026-10-27T16:00',
    end: '2026-10-27T18:00',
    title: 'Event 3',
    color: '#e7b300'
  },
  {
    start: '2026-10-29T11:00',
    end: '2026-10-29T12:00',
    title: 'Event 4',
    color: '#e9967a'
  },
  {
    start: '2026-10-30T14:00',
    end: '2026-10-30T17:00',
    title: 'Event 5',
    color: '#a917bb'
  },
  {
    start: '2026-10-31T08:00',
    end: '2026-10-31T10:00',
    title: 'Event 6',
    color: '#3d9140'
  },
  {
    start: '2026-11-01T15:00',
    end: '2026-11-01T16:00',
    title: 'Event 7',
    color: '#8b8b00'
  },
  {
    start: '2026-11-02T13:00',
    end: '2026-11-02T15:00',
    title: 'Event 8',
    color: '#6e7f29'
  },
  {
    start: '2026-11-04T10:00',
    end: '2026-11-04T12:00',
    title: 'Event 9',
    color: '#37bbe4'
  },
  {
    start: '2026-11-05T16:00',
    end: '2026-11-05T17:00',
    title: 'Event 10',
    color: '#ee9572'
  },
  {
    start: '2026-11-07T11:00',
    end: '2026-11-07T14:00',
    title: 'Event 11',
    color: '#c67171'
  },
  {
    start: '2026-11-09T07:00',
    end: '2026-11-09T09:00',
    title: 'Event 12',
    color: '#8b1a1a'
  }
])

const secondEvents = ref([
  {
    start: '2026-10-25T14:00',
    end: '2026-10-25T17:00',
    title: 'Event 1',
    color: '#e7b300'
  },
  {
    start: '2026-10-26T10:00',
    end: '2026-10-26T12:00',
    title: 'Event 2',
    color: '#6e7f29'
  },
  {
    start: '2026-10-27T08:00',
    end: '2026-10-27T09:00',
    title: 'Event 3',
    color: '#37bbe4'
  },
  {
    start: '2026-10-29T15:00',
    end: '2026-10-29T17:00',
    title: 'Event 4',
    color: '#8b1a1a'
  },
  {
    start: '2026-10-30T12:00',
    end: '2026-10-30T13:00',
    title: 'Event 5',
    color: '#c67171'
  },
  {
    start: '2026-10-31T17:00',
    end: '2026-10-31T20:00',
    title: 'Event 6',
    color: '#6e7f29'
  },
  {
    start: '2026-11-01T14:00',
    end: '2026-11-01T16:00',
    title: 'Event 7',
    color: '#a917bb'
  },
  {
    start: '2026-11-02T10:00',
    end: '2026-11-02T13:00',
    title: 'Event 8',
    color: '#7ac5cd'
  },
  {
    start: '2026-11-04T15:00',
    end: '2026-11-04T16:00',
    title: 'Event 9',
    color: '#de3d83'
  },
  {
    start: '2026-11-05T11:00',
    end: '2026-11-05T12:00',
    title: 'Event 10',
    color: '#3d9140'
  },
  {
    start: '2026-11-07T08:00',
    end: '2026-11-07T10:00',
    title: 'Event 11',
    color: '#8b8b00'
  },
  {
    start: '2026-11-09T17:00',
    end: '2026-11-09T19:00',
    title: 'Event 12',
    color: '#ee9572'
  }
])

const toastMessage = ref('')
const toastContext = ref()
const isToastOpen = ref(false)

function handleFirstCalEventCreated(args) {
  if (args.action === 'externalDrop') {
    toastMessage.value = 'Event dropped to Calendar 1'
    toastContext.value = '.md-drag-drop-first-calendar'
    isToastOpen.value = true
  }
}

function handleSecondCalEventCreated(args) {
  if (args.action === 'externalDrop') {
    toastMessage.value = 'Event dropped to Calendar 2'
    toastContext.value = '.md-drag-drop-second-calendar'
    isToastOpen.value = true
  }
}

function handleToastClose() {
  isToastOpen.value = false
}
</script>

<template>
  <MbscPage>
    <div class="md-drag-drop-calendar">
      <div class="mbsc-form-group-title">Calendar 1</div>
      <MbscEventcalendar
        :view="myView"
        :data="firstEvents"
        :height="450"
        :dragToMove="true"
        :eventDelete="true"
        :externalDrag="true"
        :externalDrop="true"
        @event-created="handleFirstCalEventCreated"
        className="md-drag-drop-first-calendar"
      />

      <div class="mbsc-form-group-title">Calendar 2</div>
      <MbscEventcalendar
        :view="myView"
        :data="secondEvents"
        :height="450"
        :dragToMove="true"
        :eventDelete="true"
        :externalDrag="true"
        :externalDrop="true"
        @event-created="handleSecondCalEventCreated"
        className="md-drag-drop-second-calendar"
      />

      <MbscToast
        :message="toastMessage"
        :context="toastContext"
        :isOpen="isToastOpen"
        @close="handleToastClose"
      />
    </div>
  </MbscPage>
</template>

Duplicate Session

You have signed in on a different machine. To keep everything in sync, you have been signed out of this session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.

Duplicate Session

We noticed you are logged in on a different machine and have closed your old session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.