BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
953 stars 328 forks source link

Not Issue, HELP! #131

Closed marketmix-matteoquintero closed 4 years ago

marketmix-matteoquintero commented 5 years ago

I am new to react, someone can help me with showing an example of how to use the function. getSelectedDate()

Please and thank you. @BugiDev

peacechen commented 5 years ago

This would be a helpful addition to the documentation. PRs are welcome.

usmanf8c commented 5 years ago

Hi,

Quick snack here!

https://snack.expo.io/S1YlKFa9H

Hope this helps.

Edit: You can use Moment JS to format the returned date :)

peacechen commented 5 years ago

Thanks for the snack @usmanf8c

@marketmix-matteoquintero Usually the best way to get the selected date is through the onDateSelected callback. https://github.com/BugiDev/react-native-calendar-strip/issues/155#issuecomment-548364620

usmanf8c commented 5 years ago

@peacechen - I thought the same. onDateSelected does return the selected date, but I thought I'd stick to the topic and draft up a snack using the getSelectedDate() method. Hope it helped @marketmix-matteoquintero .