toggle on pressing enter
This commit is contained in:
parent
d7db15cb60
commit
102a7f3c04
|
|
@ -132,7 +132,7 @@ function DatePickerComponent(props: DatePickerComponentProps) {
|
|||
function handleKeydown(e: KeyboardEvent) {
|
||||
if (document.activeElement === inputRef.current) {
|
||||
if (e.key === "Enter") {
|
||||
setDatePickerVisibility(true);
|
||||
setDatePickerVisibility((value) => !value);
|
||||
} else if (e.key === "Escape") {
|
||||
setDatePickerVisibility(false);
|
||||
} else if (e.key === "Tab") {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user