Skip to content

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

biddano
Copy link

@biddano biddano commented Jun 17, 2023

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).

@stale
Copy link

stale bot commented Oct 15, 2023

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.

@stale stale bot added the stale label Oct 15, 2023
@stale stale bot removed the stale label Nov 28, 2023
@ozhuk-hacken
Copy link

@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]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}, [descendingOrder, pastScrollRange, futureScrollRange]);

@Inbal-Tish
Copy link
Collaborator

@biddano Sorry for the late review. This feature looks great and I would like to review it if you can fix the PR please

@jcedborger
Copy link

This is a needed feature. Can you please merge it?

Copy link

@jcedborger jcedborger left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants