<a-date-picker :placeholder="today" :disabledDate="disabledDate" style="width: 150px;" v-model="enrollDate" />
disabledDate(current) {
let date = new Date()
let day = date.getDate()
let obj = moment(current).format('YYYY-MM-DD')
let start = moment(date)
.startOf('month')
.format('YYYY-MM-DD')
if (day <= 2)
start = moment(date)
.month(moment(date).month() - 1)
.startOf('month')
.format('YYYY-MM-DD')
let end = moment(date)
.endOf('month')
.format('YYYY-MM-DD')
return start > obj || obj > end
},
ant design disabledDate设置禁用时间
最新推荐文章于 2023-10-19 15:50:02 发布