Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于disabled日期的问题 #8

Closed
Madthumb opened this issue Aug 29, 2018 · 2 comments
Closed

关于disabled日期的问题 #8

Madthumb opened this issue Aug 29, 2018 · 2 comments

Comments

@Madthumb
Copy link

在使用手册里面看到:
disabled 参数 disabled为禁用日期,如禁用2018-6-21日为['2018-6-21']
但是例子程序是写成了: disabledArray 这里是不是有问题? 查了通篇的源代码没看到有引用disabledArray的地方。

export default {
  data () {
    return {
      ...
      disabledArray: ['2018-6-27','2018-6-25'],
      ...  
  },

还有就是即使写成 disabled后,对应的日子依然可以点击选择:

   return {
     ...
     disabled: ['2018-6-27','2018-6-25'],
     ...  
 },

谢谢解惑

@Madthumb
Copy link
Author

哦自己找到答案了 要定义 :disabled

@Hzy0913
Copy link
Owner

Hzy0913 commented Aug 30, 2018

禁用部分日期

<template>
  <div>
    <Calendar
      :disabled="disabledArray"
    />
  </div>
</template>


<script>
import Calendar from 'mpvue-calendar'

export default {
  data () {
    return {
      disabledArray: ['2018-6-27','2018-6-25']
    }
  }
}

@Hzy0913 Hzy0913 closed this as completed Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants