computerjazz / react-native-swipe-calendar

A swipeable calendar component for React Native.
MIT License
108 stars 13 forks source link

pageInterval=day component onPageChange triggers always start of month #6

Closed batuhansahan closed 1 year ago

batuhansahan commented 1 year ago

Its always rendering same time which is start of month

also onDateSelect is not triggers how to know when the date change ?

      <Calendar   
        pageInterval="day"
        theme={{ todayIndicatorDotColor: 'blue', inactiveOpacity: 0.5 }}
        ref={calendarRef}           
        currentDate={currentDate}
        DayComponent={DayComponent}
        selectedDate={selectedDate}
        // currently showing 1 november if you go previous page like october than it shows 1 october etc.
        onPageChange={(date)=>alert(date.toDateString())} 
        monthAnimCallbackNode={monthAnimCallbackNode}
      /> 

tested in https://snack.expo.dev/@computerjazz/react-native-swipe-calendar

computerjazz commented 1 year ago

Fixed in 0.0.21