Comments (8)
It feels abnormal to be using CDNs instead of my regular npm/webpack workflow, but it's for a legacy project that would take too long to get that set up.
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<link href='https://unpkg.com/@fullcalendar/[email protected]/main.css' rel='stylesheet' />
<link href='https://unpkg.com/@fullcalendar/[email protected]/main.css' rel='stylesheet' />
<link href='https://unpkg.com/@fullcalendar/[email protected]/main.css' rel='stylesheet' />
<script src='https://unpkg.com/@fullcalendar/[email protected]/main.js'></script>
<script src='https://unpkg.com/@fullcalendar/[email protected]/main.js'></script>
<script src='https://unpkg.com/@fullcalendar/[email protected]/main.js'></script>
<script src='https://unpkg.com/@fullcalendar/[email protected]/main.js'></script>
<script src="https://unpkg.com/@fullcalendar/[email protected]/main.umd.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
new Vue({
el: '#vue-instance',
data: function() {
return {
plugins: [
window.FullCalendarDayGrid.default,
window.FullCalendarTimeGrid.default,
window.FullCalendarInteraction.default,
],
events: [
// initial event data
{
title: "Event Now",
start: new Date()
}
]
}
},
methods: {
handleDateClick(arg) {
if (confirm("Would you like to add an event to " + arg.dateStr + " ?")) {
this.events.push({
// add new event data
title: "New Event",
start: arg.date,
allDay: arg.allDay
});
}
}
},
template: `
<div>
<FullCalendar
class="app-calendar"
defaultView="dayGridMonth"
ref="fullCalendar"
:header="{
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
}"
:plugins="plugins"
:weekends="true"
:events="events"
@dateClick="handleDateClick"
/>
</div>
`,
});
});
</script>
from fullcalendar-vue.
The Fullcalendar-Vue connector now publishes a browser-global JS file in dist/main.global.js
: https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/dist/main.global.min.js
A demo of how to use it: https://github.com/fullcalendar/fullcalendar/blob/master/examples/_global-vue.html
from fullcalendar-vue.
I tried using the Vue component from script tags and did not get that error but was not able to get it to display either:
https://codepen.io/anon/pen/oRoyYa
I'm not sure it's possible yet; if it is, an example should be added to the docs.
from fullcalendar-vue.
It's working for me. If you're loading the FullCalendar component via the CDN, you don't need to register it in the Vue instance.
from fullcalendar-vue.
@google-mac can you provide an example?
from fullcalendar-vue.
@google-mac If I want add Bootstrap Theming, how to do that? Thanks
from fullcalendar-vue.
The Fullcalendar-Vue connector now publishes a browser-global JS file in
dist/main.global.js
: https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/dist/main.global.min.jsA demo of how to use it: https://github.com/fullcalendar/fullcalendar/blob/master/examples/_global-vue.html
it's unusable example.
you need somthing like for include
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.global.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.global.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.global.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.global.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/dist/main.global.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.min.css">
but i have one problem with it
<template v-slot:eventContent='arg'>
is not working, but
eventContent: function(arg) {
is working
and there is my question - why are slots not working?
PS: also it is not working if you try use last 3.2 vue
from fullcalendar-vue.
Hello @Nix-id I'm facing the same issue, how did you solved it?
Thanks
from fullcalendar-vue.
Related Issues (20)
- i found a bug in Timeline ,when set eventMaxStack.i have a demo address,help me please. HOT 1
- resourceTimelineDay v-slot resourceLabelContent only work with column one HOT 2
- Add support for Vue Router and Vuex HOT 5
- Integration for nuxt HOT 1
- JSX issue when using in Vue 3 with Typescript HOT 8
- TypeError: Cannot set properties of undefined (setting 'VueFullcalendar') HOT 1
- Vue3: Custom event component issue: No root instance for app HOT 1
- More than 1 full calendar on the same page. HOT 1
- Event change class between determinate hours HOT 1
- Render `eventContent` in the context of the main Vue application HOT 1
- Using slots breaks optimized rendering HOT 1
- __vite_ssr_import_1__ is not defined when trying to implement FullCalendar in nuxt3 project HOT 1
- CDN triggers "Uncaught TypeError: d is undefined" and so doesn't seem to run HOT 2
- Global.vue is not a function HOT 1
- Importing fullcalendar component breaks type checking with vue-tsc HOT 4
- Horizontal scroll position on timelineMonth resets when navigating to the next day HOT 1
- dayMinWidth: No ScrollGrid implementation HOT 1
- Createapp() called for every event in fullcalendar vue3 HOT 5
- fullcalender not showing time correctly on daygrid view HOT 2
- This issue tracker has moved
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fullcalendar-vue.