Socket
Socket
Sign inDemoInstall

vue-full-calendar

Package Overview
Dependencies
49
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 4.0.0-0

.travis.yml

1

index.js

@@ -8,1 +8,2 @@ import FullCalendar from './components/FullCalendar.vue'

}
export { FullCalendar }
{
"name": "vue-full-calendar",
"version": "3.0.0",
"version": "4.0.0-0",
"description": "FullCalendar wrapper for vue",

@@ -13,3 +13,3 @@ "main": "index.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest -i"
},

@@ -33,5 +33,36 @@ "repository": {

"dependencies": {
"fullcalendar": "^3.4.0",
"babel-plugin-transform-runtime": "^6.23.0",
"fullcalendar": "^4.0.0-alpha",
"lodash.defaultsdeep": "^4.6.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-jest": "^21.2.0",
"babel-loader": "^7.1.2",
"babel-preset-stage-2": "^6.24.1",
"jest": "^21.2.1",
"jest-serializer-vue": "^0.3.0",
"jest-vue": "^0.8.2",
"jquery": "^3.2.1",
"vue": "^2.5.4",
"vue-hot-reload-api": "^2.3.0",
"vue-template-compiler": "^2.5.4"
},
"jest": {
"moduleFileExtensions": [
"js",
"vue"
],
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/$1"
},
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/jest-vue"
},
"snapshotSerializers": [
"<rootDir>/node_modules/jest-serializer-vue"
],
"mapCoverage": true
}
}
# vue-fullcalendar
[![npm version](https://badge.fury.io/js/vue-full-calendar.svg)](https://badge.fury.io/js/vue-full-calendar)
[![Build Status](https://travis-ci.org/CroudSupport/vue-fullcalendar.svg?branch=master)](https://travis-ci.org/CroudSupport/vue-fullcalendar)

@@ -14,16 +15,26 @@

and use in your project
Installing the plugin will globally add the `full-calendar` component to your project.
```js
//main.js
import FullCalendar from 'vue-full-calendar'
Vue.use(FullCalendar)
```
### jQuery
Please note that fullcalendar depends on jQuery, so it will need to be included in your project for this vue plugin to work
But you can also import the standalone component to add locally or for more complex installations.
```js
window.jQuery = window.$ = require('jquery')
// foo.vue
import { FullCalendar } from 'vue-full-calendar'
export default {
components: {
FullCalendar,
},
}
```
### jQuery
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.
### CSS

@@ -38,5 +49,10 @@ 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.

## Example App
I have created a simple Vue 2 webpack application to as an example/playground
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](https://codesandbox.io/s/5xlp873rkl)
### Scheduler
For those wanting to use the scheduler plugin, this [Code Sandbox](https://codesandbox.io/s/qlp8jvko3j) shows you a full working example.
## Basic Usage

@@ -110,2 +126,48 @@

## Custom Config
You can pass any custom [options](https://fullcalendar.io/docs/) through to fullcalendar by using the `config` prop, this includes extra event handlers.
```html
<full-calendar :events="events" :config="config" />
...
<script>
...
data() {
return {
events: [],
config: {
weekends: false,
drop(...args) {
//handle drop logic in parent
},
},
}
},
...
</script>
```
## Locale
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...
```html
<full-calendar :events="events" :config="config" />
...
<script>
import 'fullcalendar/dist/locale/fr'
...
data() {
return {
events: [],
config: {
locale: 'fr',
},
}
},
...
</script>
```
[Code Sandbox](https://codesandbox.io/s/8yl1xwk388)
*Note: You won't need to set the locale config key if your app only imports a single locale file*
## Further Props

@@ -121,2 +183,27 @@ You can edit the look and feel of fullcalendar by passing through extra props. These all have sensible defaults

## Methods
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](https://fullcalendar.io/docs/) suffixed with `(method)` and it will dynamically handle as many arguments as needed.
```html
<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>
```
## Events and Hooks

@@ -129,2 +216,4 @@

- __event-created(event)__ - Triggered on select()
- __event-receive(event)__ - Triggered on eventReceive()
- __event-render(event)__ - Triggered on eventRender()
- __day-click(date, jsEvent, view)__ - Triggered on dayClick()

@@ -131,0 +220,0 @@

.npmignore

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc