Closed MoKhajavi75 closed 4 years ago
This calendar library supports the Gregorian system. This is a community supported library and we'd welcome your contributions.
Yep, I see the Gregorian system!
I guess to add Jalali system, I should add system
and reverse
props:
system: 'gregorian' | 'jalali'
reverse: transform: [{ rotateY: '180deg' }]
Any ideas or tips?
The system
prop makes sense. What is the reverse
prop intended for? A 180 deg rotation would flip the calendar upside down 🤣
Do you want to add support for right-to-left text? RN has a feature for that type of flow:
https://reactnative.dev/blog/2016/08/19/right-to-left-support-for-react-native-apps
It's a rotateY
so it would be horizontally :grin:
I read that post and know that but that would be useful when you want to use this in an LTR app (sometimes developers force LTR because of layout problems)
I see what you mean now. When introducing the reverse
prop, would any usage of Jalali want it to be anything other than RTL? I'm not opposed to it, but it feels unwieldy for the user to set a rotation transform.
I see what you mean now. When introducing the
reverse
prop, would any usage of Jalali want it to be anything other than RTL? I'm not opposed to it, but it feels unwieldy for the user to set a rotation transform.
Nope, all the thing we neer is RTL.
Yep, I know it's somehow weird but we can have a default value of false
@MohamadKh75 I don't fully understand the requirements to implement this feature. It seems that the text would be mirrored and unreadable with the 180deg rotateY transform.
I encourage you to try adding this feature and submit a PR. This is a community supported library and we welcome your contributions.
I create a Persian (Jalali) calendar which you can find in my repos 😄.
Thanks ❤
https://github.com/MohamadKh75/react-native-jalali-datepicker
That's a nice looking version of the calendar picker. It would be courteous if you added attribution that yours is based partially on this library. Maybe in the future there will be shared bug fixes or feature enhancements.
I noticed another Jalali fork: https://github.com/afshinm/JalaliCalendarPicker
Hey
Thanks for your efforts!
May I ask for a
system
prop that choose the calendar systems (Jalali - Gregorian - ...)?