Skip to content

Commit 758dfc7

Browse files
committed
fix focus logic
1 parent dde3392 commit 758dfc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/RangePicker.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
390390

391391
// Delay to focus to avoid input blur trigger expired selectedValues
392392
setTimeout(() => {
393-
if (endInputRef.current) {
394-
endInputRef.current.focus();
393+
const inputRef = [startInputRef, endInputRef][missingValueIndex];
394+
if (inputRef.current) {
395+
inputRef.current.focus();
395396
}
396397
}, 0);
397398
}

0 commit comments

Comments
 (0)