We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e8959a commit efa045aCopy full SHA for efa045a
components/date-picker/demo/select-in-range.vue
@@ -35,7 +35,7 @@ export default defineComponent({
35
const hackValue = ref<RangeValue>();
36
37
const disabledDate = (current: Dayjs) => {
38
- if (!dates.value) {
+ if (!dates.value || (dates.value as any).length === 0) {
39
return false;
40
}
41
const tooLate = dates.value[0] && current.diff(dates.value[0], 'days') > 7;
@@ -45,8 +45,8 @@ export default defineComponent({
45
46
const onOpenChange = (open: boolean) => {
47
if (open) {
48
- dates.value = null;
49
- hackValue.value = null;
+ dates.value = [] as any;
+ hackValue.value = [] as any;
50
} else {
51
hackValue.value = undefined;
52
0 commit comments