Convert Figma logo to code with AI

Wanderxx logovue-fullcalendar

vue calendar fullCalendar. no jquery required. Schedule events management

1,509
388
1,509
98

Top Related Projects

The official Vue 3 component for FullCalendar

39,623

🐉 Vue Component Framework

46,610

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

25,724

Quasar Framework - Build high-performance VueJS user interfaces in record time

54,105

A Vue.js 2.0 UI Toolkit for Web

Quick Overview

Vue-fullcalendar is a Vue.js component wrapper for the popular FullCalendar library. It provides a powerful and customizable calendar interface for Vue applications, allowing developers to easily integrate event management and scheduling features into their projects.

Pros

  • Seamless integration with Vue.js projects
  • Extensive customization options for calendar appearance and functionality
  • Supports various calendar views (month, week, day, etc.)
  • Responsive design for different screen sizes

Cons

  • Limited documentation specific to the Vue wrapper
  • May have compatibility issues with older versions of Vue.js
  • Requires additional setup for more advanced features
  • Dependency on the FullCalendar library may increase bundle size

Code Examples

  1. Basic calendar setup:
<template>
  <full-calendar :events="events" />
</template>

<script>
import FullCalendar from 'vue-fullcalendar'

export default {
  components: { FullCalendar },
  data() {
    return {
      events: [
        { title: 'Event 1', start: '2023-05-01' },
        { title: 'Event 2', start: '2023-05-05', end: '2023-05-07' }
      ]
    }
  }
}
</script>
  1. Customizing calendar options:
<template>
  <full-calendar 
    :events="events"
    :options="calendarOptions"
  />
</template>

<script>
import FullCalendar from 'vue-fullcalendar'

export default {
  components: { FullCalendar },
  data() {
    return {
      events: [...],
      calendarOptions: {
        initialView: 'dayGridMonth',
        headerToolbar: {
          left: 'prev,next today',
          center: 'title',
          right: 'dayGridMonth,timeGridWeek,timeGridDay'
        }
      }
    }
  }
}
</script>
  1. Handling calendar events:
<template>
  <full-calendar 
    :events="events"
    @eventClick="handleEventClick"
    @dateClick="handleDateClick"
  />
</template>

<script>
import FullCalendar from 'vue-fullcalendar'

export default {
  components: { FullCalendar },
  methods: {
    handleEventClick(info) {
      console.log('Event clicked:', info.event.title)
    },
    handleDateClick(info) {
      console.log('Date clicked:', info.dateStr)
    }
  }
}
</script>

Getting Started

  1. Install the package:

    npm install vue-fullcalendar
    
  2. Import and use the component in your Vue file:

    <template>
      <full-calendar :events="events" />
    </template>
    
    <script>
    import FullCalendar from 'vue-fullcalendar'
    
    export default {
      components: { FullCalendar },
      data() {
        return {
          events: [
            { title: 'Event 1', start: '2023-05-01' },
            { title: 'Event 2', start: '2023-05-05', end: '2023-05-07' }
          ]
        }
      }
    }
    </script>
    
  3. Add any necessary CSS imports for FullCalendar in your main.js or App.vue file:

    import '@fullcalendar/core/main.css'
    import '@fullcalendar/daygrid/main.css'
    

Competitor Comparisons

The official Vue 3 component for FullCalendar

Pros of fullcalendar-vue

  • More actively maintained with regular updates and bug fixes
  • Comprehensive documentation and extensive feature set
  • Better TypeScript support and integration

Cons of fullcalendar-vue

  • Larger bundle size due to more features
  • Steeper learning curve for beginners
  • Commercial license required for some advanced features

Code Comparison

vue-fullcalendar:

<template>
  <full-calendar :events="events" :config="config"></full-calendar>
</template>

fullcalendar-vue:

<template>
  <FullCalendar :options="calendarOptions" />
</template>

The main difference in usage is that fullcalendar-vue uses a single options prop to configure the calendar, while vue-fullcalendar uses separate props for events and configuration.

fullcalendar-vue offers more flexibility and control over calendar options, but may require more setup code. vue-fullcalendar has a simpler API but less customization options.

Overall, fullcalendar-vue is more feature-rich and actively maintained, making it suitable for complex projects. vue-fullcalendar is simpler and may be easier for beginners or smaller projects with basic calendar needs.

39,623

🐉 Vue Component Framework

Pros of Vuetify

  • Comprehensive UI component library with a wide range of pre-built components
  • Active development and large community support
  • Extensive documentation and examples

Cons of Vuetify

  • Larger bundle size due to its extensive feature set
  • Steeper learning curve for beginners
  • May require more configuration for custom designs

Code Comparison

Vuetify calendar component:

<v-calendar
  ref="calendar"
  v-model="value"
  :events="events"
  color="primary"
  type="month"
></v-calendar>

vue-fullcalendar component:

<full-calendar
  :events="events"
  :config="config"
  @event-selected="eventSelected"
></full-calendar>

While both libraries provide calendar functionality, Vuetify offers a more integrated approach within its ecosystem, whereas vue-fullcalendar is a standalone calendar component. Vuetify's calendar is part of a larger UI framework, providing consistency across components, while vue-fullcalendar focuses solely on calendar functionality.

Vuetify's implementation may be more suitable for projects already using the Vuetify framework or requiring a consistent design language. vue-fullcalendar might be preferred for projects needing a lightweight, dedicated calendar solution without additional UI components.

46,610

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Pros of vue-core

  • Comprehensive Vue.js framework with full ecosystem support
  • Actively maintained with frequent updates and improvements
  • Extensive documentation and community resources

Cons of vue-core

  • Larger bundle size and potentially higher learning curve
  • May be overkill for simple projects or specific use cases
  • Requires additional setup for specialized features like calendars

Code Comparison

vue-fullcalendar:

<full-calendar :events="events" :config="config"></full-calendar>

vue-core:

<template>
  <div>
    <!-- Custom calendar implementation required -->
  </div>
</template>

Summary

vue-fullcalendar is a specialized calendar component for Vue.js, while vue-core is the core framework for building Vue applications. vue-core offers more flexibility and a complete ecosystem but requires additional work to implement specific features like calendars. vue-fullcalendar provides a ready-to-use calendar component but with less customization options and potentially less frequent updates.

Choose vue-core for full-fledged Vue.js applications with diverse requirements, and vue-fullcalendar for projects specifically needing a calendar component with minimal setup.

25,724

Quasar Framework - Build high-performance VueJS user interfaces in record time

Pros of Quasar

  • Comprehensive UI framework with a wide range of components and tools
  • Active development and large community support
  • Cross-platform development capabilities (web, mobile, desktop)

Cons of Quasar

  • Steeper learning curve due to its extensive feature set
  • Potentially larger bundle size for simple projects
  • May be overkill for projects that only need a calendar component

Code Comparison

vue-fullcalendar:

<template>
  <full-calendar :events="events" :config="config"></full-calendar>
</template>

Quasar:

<template>
  <q-calendar
    v-model="selectedDate"
    :events="events"
    view="month"
  ></q-calendar>
</template>

Summary

vue-fullcalendar is a focused calendar component for Vue.js, while Quasar is a comprehensive UI framework that includes a calendar component among many others. vue-fullcalendar may be simpler to implement for projects that only need a calendar, but Quasar offers more flexibility and features for larger, multi-platform applications. The choice between the two depends on the project's scope and requirements.

54,105

A Vue.js 2.0 UI Toolkit for Web

Pros of element

  • Comprehensive UI component library with a wide range of elements
  • Well-documented and actively maintained
  • Large community and ecosystem support

Cons of element

  • Larger bundle size due to its extensive feature set
  • Steeper learning curve for beginners
  • May require more configuration for specific use cases

Code Comparison

element:

<template>
  <el-calendar v-model="value">
  </el-calendar>
</template>

<script>
export default {
  data() {
    return {
      value: new Date()
    }
  }
}
</script>

vue-fullcalendar:

<template>
  <full-calendar :events="events"></full-calendar>
</template>

<script>
import FullCalendar from 'vue-fullcalendar'
export default {
  components: {
    FullCalendar
  },
  data() {
    return {
      events: []
    }
  }
}
</script>

element provides a more comprehensive set of UI components, including a calendar, while vue-fullcalendar focuses specifically on calendar functionality. element offers greater flexibility and customization options but may be overkill for projects that only require a calendar component. vue-fullcalendar is more lightweight and easier to implement for simple calendar needs but lacks the extensive feature set of element.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

##vue-fullcalendar

npm npm

Works for Vue2 now. This is a fullCalendar component based on vue.js . No Jquery or fullCalendar.js required. Currently, It only supports month view. It's inspired by fullCalendar.io but not cloned by it. So please read the docs here below to understand all features.

Simple Live Demo

demo.gif

install

By NPM

@latest works for Vue2 0.1.11 works for Vue1.*

// for Vue2
npm install vue-fullcalendar@latest --save 

// for Vue1
npm install vue-fullcalendar@0.1.11 --save 

or download code and include it

<script src='dist/vue-fulcalendar.min.js'>

Usage

Register component globally

// Your entry index.js
import Vue from 'vue'
import App from './App'

import fullCalendar from 'vue-fullcalendar'

Vue.component('full-calendar', fullCalendar)

// Vue2
new Vue({
  el : '#app',
  render: h => h(App),
  template : '<App/>',
  components : {
    App
  }
})

//Vue1

new Vue({
	el : 'body',
	components : {
		App
	}
})

or register locally in your .vue file

Example

<full-calendar :events="fcEvents" locale="en"></full-calendar>
var demoEvents = [
	{
      title : 'Sunny Out of Office',
      start : '2016-08-25',
      end : '2017-07-27'
    }
]
export default {
  data () {
	return {
	  fcEvents : demoEvents
	}
  },
  components : {
	'full-calendar': require('vue-fullcalendar')	
  }
}

A sample screenshot is here, Yeah you see the calendar

Docs

props

  1. events : Events will be displayed on the calendar

    events = [
      {
        title     :  'event1',
        start     : '2016-07-01',
        cssClass  : 'family',
        YOUR_DATA : {}
      },
      {
        title     : 'event2',
        start     : '2016-07-02',
        end       : '2016-07-03',
        cssClass  : ['family', 'career']
        YOUR_DATA : {}
      }
    ]         
    
    • title is the title of this event, will be displayed on calendar

    • start is the start day of this event

    • end is the end day of this event

    • cssClass is css class of each event label, such that, you will be able to set different colors, style ..

    • YOUR_DATA You can define as many data you want as possible

  2. locale : langague of things like monthNames weekNames and titleFormat. Support same locales than moment.js

    • default : en
  3. firstDay : first day of the week, Number, default: 0 (Sunday) Sunday=0, Monday=1, Tuesday=2, etc. Any number smaller than 0 or larger than 6 will be set to 0.

    • default : 0

events

fc will dispatch some events out.

  1. changeMonth : Every time you click arrow to next/last month, fc will dispatch changeMonth

    this.$dispatch('changeMonth', start, end, current)
    
    • start is the first day of current monthView (moment object)

    • end is the last day of current monthView (moment object)

    • current is the first day of current month (moment object)

  2. eventClick : Every time you click a event, fc will dispatch eventClick

    this.$dispatch('eventClick', event, jsEvent, pos)
    
    • event is an Event object hold the event's information

    • jsEvent holds the native javascript event

    • pos is the relative coordinates of fc

  3. dayClick : fc dispatch it when you click a day slot.

    this.$dispatch('eventClick', day, jsEvent)
    
    • date is a Date Object of the day you click (moment object)

    • jsEvent holds the native javascript event

  4. moreClick : fc dispatch it when you click a more button

    • date is the date corresponding to the "more" clicked (moment object)

    • events is the list of events that will be in the box

    • jsEvent holds the native javascript event

slots

You will be able to register your own stuff by using slots

  1. fc-header-left : top left area

  2. fc-header-right : top right area. In my case, I added a filter menu there

  3. fc-body-card : inside the body area, usually working with EventClick, to display a event detail

###END

NPM DownloadsLast 30 Days