<el-date-picker size="small"
v-model="dateInRange"
type="daterange"
align="right"
unlink-panels
range-separator=""
:start-placeholder="defaultBegDataName"
:end-placeholder="defaultEndDataName"
:picker-options="pickerOptions"
value-format
:default-value="new Date().getTime()-2592000000"
style="margin-left: 0px;width:486px"
>
</el-date-picker>
pickerOptions: {
shortcuts: [{
text: "",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - (3600 * 1000 * 24 * 7));
picker.$emit("pick", [start, end]);
}
}, {
text: "",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - (3600 * 1000 * 24 * 30));
picker.$emit("pick", [start, end]);
}
}, {
text: "",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - (3600 * 1000 * 24 * 90));
picker.$emit("pick", [start, end]);
}
}]
},