- Notifications
You must be signed in to change notification settings - Fork0
vue calendar fullCalendar. no jquery required. Schedule events management
0xwang-coder/vue-fullcalendar
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
##vue-fullcalendar
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.
By NPM
@latest works for Vue20.1.11 works for Vue1.*
//for Vue2npm install vue-fullcalendar@latest --save //for Vue1npm install vue-fullcalendar@0.1.11 --save
or download code and include it
<script src='dist/vue-fulcalendar.min.js'>
Register component globally
// Your entry index.jsimportVuefrom'vue'importAppfrom'./App'importfullCalendarfrom'vue-fullcalendar'Vue.component('full-calendar',fullCalendar)// Vue2newVue({el :'#app',render:h=>h(App),template :'<App/>',components :{ App}})//Vue1newVue({el :'body',components :{App}})
or register locally in your.vue file
<full-calendar:events="fcEvents"locale="en"></full-calendar>
vardemoEvents=[{title :'Sunny Out of Office',start :'2016-08-25',end :'2017-07-27'}]exportdefault{data(){return{fcEvents :demoEvents}},components :{'full-calendar':require('vue-fullcalendar')}}
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 :{}}]
titleis the title of this event, will be displayed on calendarstartis the start day of this eventendis the end day of this eventcssClassis css class of each event label, such that, you will be able to set different colors, style ..YOUR_DATAYou can define as many data you want as possible
locale : langague of things like monthNames weekNames and titleFormat. Support same locales thanmoment.js
default:en
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
fc will dispatch some events out.
changeMonth : Every time you click arrow to next/last month, fc will dispatchchangeMonth
this.$dispatch('changeMonth',start,end,current)
startis the first day of current monthView (momentobject)endis the last day of current monthView (momentobject)currentis the first day of current month (momentobject)
eventClick : Every time you click a event, fc will dispatcheventClick
this.$dispatch('eventClick',event,jsEvent,pos)
eventis an Event object hold the event's informationjsEventholds the native javascript eventposis the relative coordinates of fc
dayClick : fc dispatch it when you click a day slot.
this.$dispatch('eventClick',day,jsEvent)
dateis a Date Object of the day you click (momentobject)jsEventholds the native javascript event
moreClick : fc dispatch it when you click a
morebuttondateis the date corresponding to the "more" clicked (momentobject)eventsis the list of events that will be in the boxjsEventholds the native javascript event
You will be able to register your own stuff by using slots
fc-header-left : top left area
fc-header-right : top right area. In my case, I added a filter menu there
fc-body-card : inside the body area, usually working with
EventClick, to display a event detail
###END
About
vue calendar fullCalendar. no jquery required. Schedule events management
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- JavaScript94.6%
- Vue5.3%
- HTML0.1%

