Skip to content

Commit 4bcd797

Browse files
authored
fix(ui5-duration-picker): fix incorrect data support (#2097)
1 parent 9454ab7 commit 4bcd797

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/main/src/DurationPicker.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ class DurationPicker extends UI5Element {
406406

407407
_onkeydown(event) {
408408
if (isShow(event)) {
409+
event.preventDefault();
409410
this.togglePicker();
410411
}
411412
}
@@ -437,7 +438,7 @@ class DurationPicker extends UI5Element {
437438

438439
_handleInputChange(event) {
439440
const prevValue = this.value;
440-
this.value = event.target.value;
441+
this.value = event.target.value.replace(/[^\d:]/g, "");
441442
this.checkValue();
442443

443444
if (prevValue !== this.value) {

0 commit comments

Comments
 (0)