1👍
You can achieve this by adding a :disabled-date
attribute in the <el-date-picker>
element and pass the boolean
value to this attribute based on the calculation.
<el-date-picker :disabled-date="disabledDate" ...
In Script:
const disabledDate = (time: Date) => {
const date = new Date();
const previousDate = date.setDate(date.getDate() - 1);
return time.getTime() < previousDate;
}
- [Vuejs]-Vue.js browserify Cannot find module
- [Vuejs]-How to collect Core Web Vitals for SPA Vue application
Source:stackexchange.com