gusparis / react-native-month-year-picker

React Native Month Picker component for iOS & Android
MIT License
106 stars 74 forks source link

Help me out to get the cancel button call back #7

Closed harishmurali94 closed 4 years ago

gusparis commented 4 years ago

Sure! Can you share me the piece of code you are using for the onChange callback?

harishmurali94 commented 4 years ago

@gusparis <MonthPicker onChange={this._handleDatePicked} value={new Date()} minimumDate={new Date(2018, 5)} maximumDate={new Date(2035, 5)} /> this is my onchange function _handleDatePicked = (event, newDate) => { console.log('EVENT', event); } on this when i click cancel i am not getting any response on event

harishmurali94 commented 4 years ago

@gusparis for me on android when i close the pop up using cancel and go to next page and come back to same page automatically the modal is getting opened without calling the picker. Facing the same when clicking outside the modal also

gusparis commented 4 years ago

Will check about the event. Receiving it correctly on example. About the closing, are you setting the show/not show prop on your side? The component itself doesn’t manage the toggling.

harishmurali94 commented 4 years ago

Yes i am handling the show prop on my side

harishmurali94 commented 4 years ago

how to get close button call back

harishmurali94 commented 4 years ago

@gusparis Hi thanks for the time when i updated the library it is working fine