Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
vue-full-calendar
Advanced tools
npm install --save vue-full-calendar
Or for Vue 1.x users
npm install --save vue-full-calendar@0.0.3
Installing the plugin will globally add the full-calendar
component to your project.
//main.js
import FullCalendar from 'vue-full-calendar'
Vue.use(FullCalendar)
But you can also import the standalone component to add locally or for more complex installations.
// foo.vue
import { FullCalendar } from 'vue-full-calendar'
export default {
components: {
FullCalendar,
},
}
Please note that fullcalendar depends on jQuery, but you won't need to add it to your project manually, fullcalendar will handle this for you automatically if jQuery is not detected.
As of version 2.0, we have removed the automatic import of the fullcalendar.css, you will need to explicitly import this css file in your project.
import 'fullcalendar/dist/fullcalendar.css'
I have created a simple Vue 2 webpack application as an example/playground https://github.com/BrockReece/vue-fullcalendar-example
or try out this Code Sandbox
For those wanting to use the scheduler plugin, this Code Sandbox shows you a full working example.
You can pass an array of fullclendar objects through the props
<full-calendar :events="events"></full-calendar>
...
<script>
...
data() {
return {
events: [
{
title : 'event1',
start : '2010-01-01',
},
{
title : 'event2',
start : '2010-01-05',
end : '2010-01-07',
},
{
title : 'event3',
start : '2010-01-09T12:30:00',
allDay : false,
},
]
}
}
...
</script>
More event options can be found at http://fullcalendar.io/docs/event_data/Event_Object/
<full-calendar :event-sources="eventSources"></full-calendar>
...
<script>
...
data() {
return {
eventSources: [
{
events(start, end, timezone, callback) {
self.$http.get(`/myFeed`, {timezone: timezone}).then(response => {
callback(response.data.data)
})
},
color: 'yellow',
textColor: 'black',
},
{
events(start, end, timezone, callback) {
self.$http.get(`/anotherFeed`, {timezone: self.timezone}).then(response => {
callback(response.data.data)
})
},
color: 'red',
},
]
}
}
...
</script>
You can pass any custom options through to fullcalendar by using the config
prop, this includes extra event handlers.
<full-calendar :events="events" :config="config" />
...
<script>
...
data() {
return {
events: [],
config: {
weekends: false,
drop(...args) {
//handle drop logic in parent
},
},
}
},
...
</script>
You can set the language of your calendar by importing the corresponding locale file and setting the locale
key in the config prop. For example, to set up the Calendar in French...
<full-calendar :events="events" :config="config" />
...
<script>
import 'fullcalendar/dist/locale/fr'
...
data() {
return {
events: [],
config: {
locale: 'fr',
},
}
},
...
</script>
Note: You won't need to set the locale config key if your app only imports a single locale file
You can edit the look and feel of fullcalendar by passing through extra props. These all have sensible defaults
Sometimes you may need to manipulate the Calendar from your parent component, you can use fireMethod
for this. This works with anything in the Fullcalendar docs suffixed with (method)
and it will dynamically handle as many arguments as needed.
<full-calendar :events="events" ref="calendar" />
...
<script>
...
data() {
return {
events: [],
}
},
methods: {
next() {
this.$refs.calendar.fireMethod('next')
},
changeView(view) {
this.$refs.calendar.fireMethod('changeView', view)
},
},
...
</script>
You can listen for these events using the following markup
<full-calendar :event-sources="eventSources" @event-selected="eventSelected"></full-calendar>
You can trigger these events in the parent component like so...
<full-calendar ref="calendar" :event-sources="eventSources"></full-calendar>
...
<script>
...
methods: {
refreshEvents() {
this.$refs.calendar.$emit('refetch-events')
},
}
...
</script>
FAQs
FullCalendar wrapper for vue
The npm package vue-full-calendar receives a total of 2,501 weekly downloads. As such, vue-full-calendar popularity was classified as popular.
We found that vue-full-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.