mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-11 01:42:34 +00:00
feat(Calendar): close calendar overlay if pressed enter, input value is valid and manualInput is true
This commit is contained in:
parent
6dfbbeab59
commit
975991378a
1 changed files with 8 additions and 0 deletions
|
@ -2665,6 +2665,14 @@ export default {
|
|||
if (this.overlayVisible) {
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue