限制选取的日期范围
 效果图
 
<a-date-picker
    v-model="dateTime"
    format="YYYY-MM-DD"
    :disabled-date="disabledDate"
    valueFormat="YYYY-MM-DD"
    placeholder="请选择日期"
    allowClear
/>
methods:{
	//回放日期选取范围限制,从今天往前推三十天
	disabledDate(value) {
	    const curDate = new Date().getTime();
	    // 这里设置天数,这里为30天
	    const numMonth = 30 * 24 * 3600 * 1000;
	    const threeMonths = curDate - numMonth;
	    return new Date(value).getTime() > curDate || new Date(value).getTime() < threeMonths;
	},
}










