elementUI 日期 周周周周周周周日快捷键

Posted langqq

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了elementUI 日期 周周周周周周周日快捷键相关的知识,希望对你有一定的参考价值。

<el-date-picker
v-model="ruleForm.pickDateMeal"
type="daterange"
align="right"
:range-separator="$t(‘message.To‘)"
:start-placeholder="$t(‘message.Start_date‘)"
:end-placeholder="$t(‘message.End_date‘)"
@change="getDateHandler"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
:picker-options="pickerOptions2"
:default-value="defalutDate"
>
</el-date-picker>

pickerOptions2: {
shortcuts: [{
text: ‘星期一‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 1, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期二‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 2, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期三‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 3, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期四‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 4, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期五‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 5, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期六‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 6, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘星期日‘,
onClick (picker) {
const end = new Date()
const start = new Date()
_this.getDaysMonday(start, 90, 2, 0, _this.allDays)
picker.$emit(‘pick‘, [start, end])
}
}, {
text: ‘今天‘,
onClick (picker) {
picker.$emit(‘pick‘, new Date())
}
}
],
// 设置选择今天以及今天之后的日期
disabledDate (time) {
return time.getTime() < Date.now() - 8.64e7
}
}



















































































以上是关于elementUI 日期 周周周周周周周日快捷键的主要内容,如果未能解决你的问题,请参考以下文章

第八周周总结

第七周周总结

CSDN第17周周赛题解

CSDN第17周周赛题解

第六周周结

第八周周总结