feat(Calendar): close calendar overlay if pressed enter, input value is valid and manualInput is true

pull/5051/head
Oğuzhan 2024-01-09 18:31:12 +03:00
parent 6dfbbeab59
commit 975991378a
1 changed files with 8 additions and 0 deletions

View File

@ -2665,6 +2665,14 @@ export default {
if (this.overlayVisible) { if (this.overlayVisible) {
this.overlayVisible = false; this.overlayVisible = false;
} }
} else if (this.overlayVisible && event.code === 'Enter' && this.manualInput && event.target.value !== null && event.target.value?.trim() !== '') {
try {
if (this.isValidSelection(this.parseValue(event.target.value))) {
this.overlayVisible = false;
}
} catch (err) {
/* NoOp */
}
} }
}, },
overlayRef(el) { overlayRef(el) {