fix(components): [date-picker] fix error when type="daterange" (#7858)

This commit is contained in:
Zivvvv 2022-05-25 11:41:12 +08:00 committed by GitHub
parent 7ff199c60f
commit ec8ac5e47b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -406,7 +406,7 @@ export default defineComponent({
const newDate = getDateOfCell(row, column)
if (props.selectionMode === 'range') {
if (!props.rangeState.selecting) {
if (!props.rangeState.selecting || !props.minDate) {
ctx.emit('pick', { minDate: newDate, maxDate: null })
ctx.emit('select', true)
} else {