-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue 3 (beta) support #131
Comments
same question! |
It hasn't been updated for Vue 3 yet, the demo also has an error with v3: |
a PR with Vue v3 support would be very welcome! |
@arshaw @acerix @kgilden @irustm
|
I'm also having the same troubles making the plugin work under Vue 3, I've tried to emulate what @lchrennew is suggesting but I got the error Please import the top-level fullcalendar lib before attempting to import a plugin. Hope someone can provide a Vue 3 compatible PR soon 😢. |
Hi, dear full calendar team, since v3 was already released, is there any plans to support vue 3 soon ? |
I have this simple component to make fullcalendar work on vue3 + vite // needed to make sure the `vdom` loads before everything else - fix for vite
import "@fullcalendar/core/vdom";
import { Calendar, CalendarOptions } from "@fullcalendar/core";
import {
defineComponent,
h,
onMounted,
onUnmounted,
ref,
watchEffect,
} from "vue";
export default defineComponent({
props: {
options: Object as () => CalendarOptions,
},
setup(props) {
const el = ref<HTMLElement>();
const calendar = ref<Calendar>();
onMounted(() => {
calendar.value = new Calendar(el.value!, props.options);
calendar.value.render();
});
watchEffect(() => {
if (calendar.value) {
calendar.value.pauseRendering();
calendar.value.resetOptions(props.options);
calendar.value.resumeRendering();
}
});
onUnmounted(() => {
calendar.value?.destroy();
});
return () => h("div", { ref: el });
},
}); |
Yeah I did something similar I used vanilla js fullcalendar within a vue component and use watchers to update options on the calendar |
I can confirm that the wrapper provided by @pikax works great on vue3 with vite. |
@pikax this is incredible. Thanks a lot for sharing! With that setup, it's easy to even pass back the Calendar Api to the parent with a simple event: Well done! |
Hi, It work with the code from @lchrennew ! i just have a problem with the v-slot:eventContent. it didn't work with the trick. |
There is now an official Vue 3 package: I've retrofitted the existing docs to mention Vue3: Please post bugs/requests as separate tickets! |
I installed the fullcalendar library to my Vue 3 project but when I serve the application, I get a warning in my terminal that says ""export 'default' (imported as 'Vue') was not found in 'vue' ".
This crashes the app with the same error when I open the browser. I tried creating the shim.d.ts with the required content but this doesnt still solve the problem.
Here is the vue component script tag.
Is there any workaround for this or is this library not supported with Vue 3?
The text was updated successfully, but these errors were encountered: