Skip to content

Commit 71e88e6

Browse files
committed
set value only when the blur event is from html input element
1 parent b461987 commit 71e88e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/DateInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ class DateInputInner extends Component<
200200
}
201201

202202
onInputBlur(e: FocusEvent<HTMLInputElement | HTMLButtonElement>) {
203-
this.setValueFromInput(e.target.value);
203+
if (e.target.tagName.toLowerCase() === 'input') {
204+
this.setValueFromInput(e.target.value);
205+
}
204206
setTimeout(() => {
205207
if (!this.isFocusedInComponent()) {
206208
if (this.props.onBlur) {

0 commit comments

Comments
 (0)