fix(date-picker): date-picker focus end-time resets start-time (#2290)

This commit is contained in:
zycoJamie 2021-07-28 17:15:44 +08:00 committed by GitHub
parent 74d03dd173
commit 88a327fa4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -527,6 +527,8 @@ export default defineComponent({
if (!maxDate.value || maxDate.value.isBefore(minDate.value)) {
maxDate.value = minDate.value
rightDate.value = maxDate.value
rightDate.value = rightDate.value.add(1, 'month')
}
}
@ -543,6 +545,7 @@ export default defineComponent({
if (maxDate.value && maxDate.value.isBefore(minDate.value)) {
minDate.value = maxDate.value
leftDate.value = minDate.value
}
}