From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 11 Mar 2022 16:11:35 +0000 (-0800) Subject: Fix enter key was prevented X-Git-Tag: beta-1.6.1~112^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F253%2Fhead;p=thirdparty%2Fpaperless-ngx.git Fix enter key was prevented --- diff --git a/src-ui/src/app/components/common/date-dropdown/date-dropdown.component.ts b/src-ui/src/app/components/common/date-dropdown/date-dropdown.component.ts index fecac367b1..70d02540c1 100644 --- a/src-ui/src/app/components/common/date-dropdown/date-dropdown.component.ts +++ b/src-ui/src/app/components/common/date-dropdown/date-dropdown.component.ts @@ -122,7 +122,7 @@ export class DateDropdownComponent implements OnInit, OnDestroy { // prevent chars other than numbers and separators onKeyPress(event: KeyboardEvent) { - if (!/[0-9,\.\/-]+/.test(event.key)) { + if ('Enter' !== event.key && !/[0-9,\.\/-]+/.test(event.key)) { event.preventDefault() } } diff --git a/src-ui/src/app/components/common/input/date/date.component.ts b/src-ui/src/app/components/common/input/date/date.component.ts index 709f96e758..251ba9c98d 100644 --- a/src-ui/src/app/components/common/input/date/date.component.ts +++ b/src-ui/src/app/components/common/input/date/date.component.ts @@ -29,7 +29,7 @@ export class DateComponent extends AbstractInputComponent implements OnI // prevent chars other than numbers and separators onKeyPress(event: KeyboardEvent) { - if (!/[0-9,\.\/-]+/.test(event.key)) { + if ('Enter' !== event.key && !/[0-9,\.\/-]+/.test(event.key)) { event.preventDefault() } }