New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@cool_zjy/vue-calendars

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cool_zjy/vue-calendars

Multifunctional calendar component for Vue

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

vue-calendars

一个极简的日历控件。

使用

<day :month="now" :selected="selected" @click="select"></day>
import { Day } from 'vue-calendars'

export default {
  data: {
    const now = new Date()
    return {
      now,
      selected: { start: now, end: now }
    }
  },

  methods: {
    select (date) {
      this.selected = { start: date, end: date }
    }
  },

  components: { Day }
}

API

Props

Prop类型描述默认值/必需
month(year)Date日历展示的月份(在月日历中为年份)必需
filterFunction (Date => Boolean)过滤日历中可以选择的项() => true
selectedObject({ start: Date, end: Date })设置选中项
pendingArray([ Date, Date ])设置未决选中项[]

Events

Event参数描述
clickdate点击日历中某一项时触发
enterdate鼠标移入日历中某一项时触发
leavedate鼠标移出日历中某一项时触发

⚠️注意:事件参数提交的 date 对象为开始的时间点,即:选中一天时结果为该天 00:00:00,选中一周时结果为该周周一 00:00:00,选中一月时结果为该月 1 日 00:00:00。

示例

参考 examples 文件夹。

Keywords

FAQs

Package last updated on 09 Aug 2018

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