Я только что решил, установив реквизиты from-page
и to-page
.как
<DatePicker :from-page="fromPage" :to-page="toPage" mode="range"/>
И используйте momentjs
, чтобы получить эти параметры
get currentMonth() {
const month = moment().month()+1; // 0 to 11
const year = moment().year();
return { month, year };
}
get previousMonth() {
const month = moment().subtract(1, "month").month()+1; // 0 to 11
const year = moment().subtract(1, "month").year();
return { month, year };
}