Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edu-vue-event-calendar

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edu-vue-event-calendar

A simple calendar to mark events for Vue2

  • 1.4.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

vue-event-calendar

A simple events calendar for Vue2, no dependencies except Vue2. responsive & mobile first. Live Demo Here

npm version

中文文档

Requirements

  • vue: ^2.0.0

Usage

install
 npm install vue-event-calendar --save
main.js
import 'vue-event-calendar/dist/style.css' //^1.1.10, CSS has been extracted as one file, so you can easily update it.
import vueEventCalendar from 'vue-event-calendar'
Vue.use(vueEventCalendar, {locale: 'en'}) //locale can be 'zh' , 'en' , 'es', 'pt-br', 'ja', 'ko', 'fr'
file.vue
<template>
  <vue-event-calendar :events="demoEvents"></vue-event-calendar>
</template>

<script>
export default {
  data () {
    return {
      demoEvents: [{
        date: '2016/12/15',
        title: 'Foo',
        desc: 'longlonglong description'
      },{
        date: '2016/11/12',
        title: 'Bar'
      }]
    }
  }
}
</script>

Customization

If you want customization event template. required Vue: ^2.1.0. Because I use new feature(Scoped Slots) of ^2.1.0

Customization color
//When Vue.use, you can set main color
Vue.use(vueEventCalendar, {locale: 'en', color: '#4fc08d'})
Customization event template
<template>
  <vue-event-calendar :events="demoEvents">
      <template scope="props">
        <div v-for="(event, index) in props.showEvents" class="event-item">
          <!-- In here do whatever you want, make you owner event template -->
          {{event}}
        </div>
      </template>
    </vue-event-calendar>
</template>

<script>
export default {
  data () {
    return {
      demoEvents: [{
        date: '2016/12/15',
        title: 'eat',
        desc: 'longlonglong description'
      },{
        date: '2016/11/12',
        title: 'this is a title'
      }]
    }
  }
}
</script>

Component Events

Can handle two Events, @day-changed and @month-changed, callback params like {date: '2017/06/23', events: []}.

<template>
  <vue-event-calendar
    :events="demoEvents"
    @day-changed="handleDayChanged"
    @month-changed="handleMonthChanged">
  </vue-event-calendar>
</template>

API

// NextMonth
this.$EventCalendar.nextMonth()
// PreMonth
this.$EventCalendar.preMonth()
//ToDate
this.$EventCalendar.toDate('2016/11/12')

More in Demo Folder

Develop

npm run dev  //develop
npm run build //production

Change log

1.3.6 -> 1.4.0
  • Remove today background, use a small dot below the date
  • Increase the selected date style

Keywords

FAQs

Package last updated on 30 Aug 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc