el-date-picker设置一年的区间
时间: 2023-12-22 14:28:44 浏览: 99
el-date-picker 英文改中文.doc
5星 · 资源好评率100%
以下是el-date-picker设置一年的区间的代码演示:
```html
<el-date-picker
v-model="pickDataList"
type="monthrange"
:picker-options="pickerOptions"
value-format="yyyy-MM"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['', '']"
:unlink-panels="true"
:range-separator="'-'"
@change="getRoomCheckInRecordList"
></el-date-picker>
```
```html
<script>
export default {
data() {
return {
pickDataList: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
}
}
};
},
methods: {
getRoomCheckInRecordList() {
// Your method logic here
}
}
};
</script>
```
阅读全文