Replies: 11 comments
-
@nandorojo I have plans to provide animated values, which can be used to achieve your desired effect (call This is how year / month interpolation is working, it just isn't exposed. export type CalendarCurrentAnimatedMonthFromCommonEra = Animated.SharedValue<CalendarMonthFromCommonEra>;
export type CalendarCurrentAnimatedMonthInYear = Animated.SharedValue<number>;
export type CalendarStartMonthFromCommonEra = number;
export type CalendarEndMonthFromCommonEra = number;
export type CalendarAnimatedScrollProgress = Animated.SharedValue<number>; to use in animations and interpolations. To achieve 'worklet'
const month = Math.round(CalendarCurrentAnimatedMonthInYear.value)
runOnJS(onMonthChanged)(month); |
Beta Was this translation helpful? Give feedback.
-
Would you be open to having that callback function on the component? It could make for a better DX to not have to pass a shared value and keep track of it. The component itself could just call the callback whenever it changes, maybe using a currentMonth derived value and useAnimatedReaction? If not, I suppose I can create a wrapper. |
Beta Was this translation helpful? Give feedback.
-
The problem with that approach is that it is very limiting to what developer can achieve with it. I would prefer to provide some unified / general interface with maximum capabilities. The best way I can do is just to provide animated values. It can be changed, but for now I think it's the best approach. |
Beta Was this translation helpful? Give feedback.
-
Gotcha, thanks for letting me know. |
Beta Was this translation helpful? Give feedback.
-
@likern another question for you - do you expect this to work on web? I assume it will if it uses reanimated and RNGH, but figured I'd ask. I'm happy to help make this happen if needed. I haven't tried it on web yet but I will be soon. |
Beta Was this translation helpful? Give feedback.
-
@nandorojo Good question 👍🏻 I expect and hope it will work on I personally haven't worked with I am going to support On the other hand supporting
So technically yes, I can add support for
|
Beta Was this translation helpful? Give feedback.
-
This seems like the main blocker, but all it would take is adding some arrows right? Which could work well on native anyway. |
Beta Was this translation helpful? Give feedback.
-
I'm open to trying this on web and contributing where I see necessary. Just want to make sure you're cool with that, and that you're open to web PRs/help, and that you plan on it being a full library. Appreciate it! |
Beta Was this translation helpful? Give feedback.
-
I think yes. No blocker here. |
Beta Was this translation helpful? Give feedback.
-
I'll try to take a look in the next week and see what I find. |
Beta Was this translation helpful? Give feedback.
-
Yes, I'm open on adding new platforms |
Beta Was this translation helpful? Give feedback.
-
Hey this looks awesome! I came across it on a Reanimated issue (I believe about slow lists). I maintain Moti and a few other React Native libraries. I've also contributed to react-native-paper-dates.
The product I'm working on is very heavily calendar focused, so I'm intrigued by this library. I've only been using web so far, but I'm building my RN app for native, and I'm thinking of using this library to create a split Calendar/list view, similar to the iOS Calendar app.
Question: are you planning on adding callbacks for things like
onMonthChanged
, etc? I'd like to fetch data for a given month as the user swipes, and do other things like that. I'd also like to mark dates that have multiple events with docs, etc. Just wondering if that's something that's planned for the future (I know this is still new!)Thanks for making this, excited to try it out.
Beta Was this translation helpful? Give feedback.
All reactions