React-native-ui-kitten: Closing the calendar after onSelect event on Datapicker

Created on 5 May 2020  路  3Comments  路  Source: akveo/react-native-ui-kitten

馃挰 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 |

Help wanted

Most helpful comment

@simonsankar
This one works for me

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

All 3 comments

@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!

@simonsankar
This one works for me

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PORA69 picture PORA69  路  3Comments

jeloagnasin picture jeloagnasin  路  3Comments

nonameolsson picture nonameolsson  路  3Comments

sobiso picture sobiso  路  3Comments

RWOverdijk picture RWOverdijk  路  3Comments