# Q-Calendar 卡片日历

# 基础用法

当前点击的时间为

<template>
  <QCalendar @change="getDate" :scheduleDates="[new Date().toISOString().split('T')[0]]"></QCalendar>
  当前点击的时间为
  <el-tag>{{currentDate}}</el-tag>
</template>

<script>
  export default {
    data() {
      return {
        currentDate: undefined
      }
    },
    methods: {
      getDate(date) {
        console.log('date==>', date)
        if (date) {
          this.currentDate = date.split(' ')[0]
        }
      }
    }
  }
</script>
Expand Copy

# Attributes

属性名 说明 类型 可选值 默认值
scheduleDates 日期数组 Array yyyy-MM-dd

# Events

事件名 说明 回调参数 参数说明
getDate 获取当前点击时间 date 时间