时间范围选择
<template>
<el-date-picker v-model="value"
type="daterange"
@change="handleDateChange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd">
</el-date-picker>
</template>
<script>
export default {
data() {
return {
value: null,
};
},
methods: {
handleDateChange(val) {
console.log(val);
// ["2020-12-04", "2021-01-05"]
this.$emit("date-change", val)
},
},
}
</script>