Skip to content

Commit fc38365

Browse files
karwostsMindFreeze
andauthored
Fix keyboard for ha-date-input (#27968)
* Fix keyboard for ha-date-input * Update src/components/ha-date-input.ts Co-authored-by: Petar Petrov <[email protected]> --------- Co-authored-by: Petar Petrov <[email protected]>
1 parent b93bf3b commit fc38365

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/ha-date-input.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ export class HaDateInput extends LitElement {
9494
}
9595

9696
private _keyDown(ev: KeyboardEvent) {
97+
if (["Space", "Enter"].includes(ev.code)) {
98+
ev.preventDefault();
99+
ev.stopPropagation();
100+
this._openDialog();
101+
return;
102+
}
97103
if (!this.canClear) {
98104
return;
99105
}

0 commit comments

Comments
 (0)