doc: fix select range time issue, close #5125

pull/5147/head
tangjinzhou 2022-01-06 10:27:05 +08:00
parent 3e8959ad22
commit efa045ab9c
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ export default defineComponent({
const hackValue = ref<RangeValue>();
const disabledDate = (current: Dayjs) => {
if (!dates.value) {
if (!dates.value || (dates.value as any).length === 0) {
return false;
}
const tooLate = dates.value[0] && current.diff(dates.value[0], 'days') > 7;
@ -45,8 +45,8 @@ export default defineComponent({
const onOpenChange = (open: boolean) => {
if (open) {
dates.value = null;
hackValue.value = null;
dates.value = [] as any;
hackValue.value = [] as any;
} else {
hackValue.value = undefined;
}