chore(Calendar): using compareDay util (#10198)

This commit is contained in:
neverland 2022-01-16 16:45:24 +08:00 committed by GitHub
parent 6dbd0caf2b
commit f50c462978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,10 +406,11 @@ export default defineComponent({
);
if (disabledDay) {
if(startDay.getTime() >= getPrevDay(disabledDay).getTime()) {
const endDay = getPrevDay(disabledDay);
if (compareDay(startDay, endDay) === -1) {
select([startDay, endDay]);
} else {
select([date]);
}else {
select([startDay, getPrevDay(disabledDay)]);
}
} else {
select([startDay, date], true);