vue-calendar-mobile-panel
v2.0.0
Published
a calendar component for vue
Downloads
14
Readme
vue-calendar-mobile-panel
Install
pnpm i vue-calendar-mobile-panel -S
Demo
Preview
Usage
template
<Calendar
:date="date"
:sunday-begin="true" // 默认是周一开始 当是true的时候 是周日开始
:mark="marks"
:disable="disable" // 禁用日期 字符串、数组,自定义函数
@select="onCheck" //日期点击时触发
></Calendar>
script
import { ref } from 'vue';
import Calendar from 'vue-calendar-mobile-panel';
const date = ref(new Date())
const marks = ref(['2023/07/11', '2023/07/18']);
const disable = (day) => {
return day.split('/')[2] === '12';
};
const onCheck = (day) => {
console.log(day);
};