Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing the calendar after onSelect event on Datapicker #1066

Closed
simonsankar opened this issue May 5, 2020 · 3 comments
Closed

Closing the calendar after onSelect event on Datapicker #1066

simonsankar opened this issue May 5, 2020 · 3 comments

Comments

@simonsankar
Copy link

💬 Is there a way close the calendar after an onSelect event on the Datepicker component?

I'd like to close the calendar after the onSelect event is triggered. Is this possible somehow?
Thanks!

UI Kitten and Eva version

Package Version
@eva-design/eva ^2.0.0-alpha.1
@ui-kitten/components ^5.0.0-alpha.1
@artyorsh
Copy link
Collaborator

artyorsh commented May 6, 2020

@simonsankar I tried to achieve the same by ref methods, but it seems buggy for now, and calendar still visible. Will include this in stable release #1055. Thnaks for posting!

@interstellarbox
Copy link

@simonsankar
This one works for me

ref={datepicker}
onSelect={nextDate => {
...
datapicker.current.blur();
}}

@artyorsh artyorsh mentioned this issue May 12, 2020
2 tasks
@artyorsh
Copy link
Collaborator

artyorsh commented May 12, 2020

Starting from the stable release this will become a default behavior. And, to reduce the refs boilerplate, will have a configurable property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants