Skip to content

Commit 4ad3e63

Browse files
committed
fix: UCalendar: restore single date selecting logic
1 parent a05fcb6 commit 4ad3e63

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/ui.form-calendar/UCalendar.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,11 @@ function onInputDate(newDate: Date | null) {
453453
}
454454
455455
if (props.range && isRangeDate(localValue.value)) {
456-
const localFromTime =
457-
localValue.value?.from instanceof Date ? localValue.value?.from.getTime() : 0;
458-
459-
const isSameAsFrom = newDate.getTime() === localFromTime;
460456
const isNewDateLessFromDate = localValue.value.from && newDate < localValue.value.from;
461457
const areToAndFromDateExists = localValue.value.to && localValue.value.from;
462458
const hasFrom = localValue.value.from;
463459
464-
const isFullReset = isSameAsFrom || isNewDateLessFromDate || areToAndFromDateExists || !hasFrom;
460+
const isFullReset = isNewDateLessFromDate || areToAndFromDateExists || !hasFrom;
465461
466462
const updatedValue = isFullReset
467463
? { from: newDate, to: null }

0 commit comments

Comments
 (0)