vue 显示日期只显示年月_vue 日历组件只显示本月和下个月 -- 多选日期

本文介绍了如何使用Vue创建一个日历组件,该组件仅显示年月,并允许用户选择多个日期。通过定义方法如`definedMon`、`getNextMonth`等,实现了展示当前月和下一个月的日期,并提供了多选日期的功能。同时,组件还包含了处理日期不可点击的逻辑以及日期切换功能。
摘要由CSDN通过智能技术生成

效果就是上图

代码贴出

1.在components > calander > index.vue

取消
确定
{ {currentDate}}

今天

{ {item.number}}展位

{ {item.num}}

{ {item.number}}展位

{ {currentDateTwo}}

{ {item.num}}{ {item.number}}

{ {item.number}}展位

import vue from 'vue'

export default {

name: 'calander',

data () {

return {

calanderList: [],

show: false,

currentDate: '2017年05月03日',

currentDateTwo: '2017年06月03日',

dayList: '',

currentDayList: [],

currentObj: '',

currentDay: '',

mouth: [],

currentMouth: null,

hoverDate: {'date': null, 'mouth': null, 'year': null},

activeClick: 0,

active: [],

actives: [],

Section: [],

firstIndex: 0,

lastIndex: 0,

currentDayListData: [],

currentJudge: false,

currentObjNew: '',

Sections: [],

lastType: '',

fristType: '',

numArray: [],

numArrayTwo: []

}

},

props: {

propshow: false,

boothArray: [], // 从父级传来的数组参数,主要是传来天中携带的number展位参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值