React Native:How 获取日历视图的日期

React Native:How to get the date of the calendar view

我正在使用 React-native-calendar 来显示现有预订的日期。我正在寻找如何在转到日历的上个月后获取该月的日期

https://github.com/wix/react-native-calendars

我可以看到他们在顶部指定了一个日历对象,但我如何访问它,在本机反应中。

您可以使用 onMonthChange 事件获取日历的当前可见月份。

// Handler which gets executed when visible month changes in calendar. Default = undefined
  onMonthChange={(month) => {console.log('month changed', month)}}