Changes made in TOAST UI Calendar v2.0 are reflected in Vue Wrapper. For more information about changes in TOAST UI Calendar v2.0, refer to the TOAST UI Caledar v2 Migration Guide.
This guide summarizes the changes only in Vue Wrapper.
In v2, the name was changed from schedule
to event
to match the meaning of events in the calendar. So, the schedules
prop has been renamed to events
.
In v1, the calendar instance methods were called indirectly by invoke
method. Since v2, it provides getInstance
method to get the calendar instance. You can use it to call the calendar instance methods.
<template>
<Calendar
style="height: 800px"
ref="calendar"
/>
</template>
<script>
import Calendar from '@toast-ui/vue-calendar';
import '@toast-ui/calendar/dist/toastui-calendar.min.css';
export default {
name: 'YourComponent',
components: {
Calendar,
},
computed: {
calendarInstance() {
return this.$refs.calendar.getInstance();
}
},
mounted() {
this.calendarInstance.setDate('2022-06-29T12:30:00');
}
};
</script>