-
Notifications
You must be signed in to change notification settings - Fork 3k
Added descending order to CalendarList #2257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@yakirza17 Could I ask you to check this and approve it pls? |
@@ -120,7 +123,7 @@ const CalendarList = (props: CalendarListProps & ContextProp, ref: any) => { | |||
const rangeDate = initialDate.current?.clone().addMonths(i - pastScrollRange, true); | |||
months.push(rangeDate); | |||
} | |||
return months; | |||
return descendingOrder ? months.reverse() : months; | |||
}, [pastScrollRange, futureScrollRange]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, [descendingOrder, pastScrollRange, futureScrollRange]);
@biddano Sorry for the late review. This feature looks great and I would like to review it if you can fix the PR please |
This is a needed feature. Can you please merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see @ozhuk-hacken's comment. After that, please merge.
This PR will allow users the flexibility to view CalendarList months in descending order rather than ascending order (current functionality). Added an optional descendingOrder prop to CalendarList for this (defaults to false).