Skip to content

DateRangePicker: add ability to use predefined ranges #608

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

Merged
merged 19 commits into from
Aug 12, 2025

Conversation

hoorayimhelping
Copy link
Collaborator

@hoorayimhelping hoorayimhelping commented Jun 9, 2025

Adds predefined ranges to DateRangePicker.

  • allows setting predefined dates
  • allows limiting the range of dates to a specified value: maxRangeLength
  • allows setting a flag futureStartDatesDisabled, to disable start dates in the future

predefined dates list

Screenshot 2025-08-01 at 2 37 32 PM

limit of 15 for dateRangeLimit

Screenshot 2025-08-01 at 2 36 32 PM

Copy link

vercel bot commented Jun 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Project Deployment Preview Comments Updated (UTC)
click-ui Ready Preview Comment Aug 12, 2025 1:52pm

@crisalbu
Copy link

Hey @hoorayimhelping , sorry for the late reply.

I was wondering, could we do this instead? I realize you may need to make more than a simple change, but it would look better I think 🙂

Screenshot 2025-06-16 at 15 02 38

Copy link

@crisalbu crisalbu left a comment

Choose a reason for hiding this comment

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

Great work as always, @hoorayimhelping ! 🙌🏻

ariser
ariser previously requested changes Aug 1, 2025
Copy link
Collaborator

@ariser ariser left a comment

Choose a reason for hiding this comment

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

great work @hoorayimhelping!
a few comments

);
})}
</ScrollableContainer>
<StyledDropdownItem onClick={handleCustomTimePeriodClick}>
Copy link
Collaborator

@ariser ariser Aug 1, 2025

Choose a reason for hiding this comment

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

can we show the calendar on hover?
less clicks
plus in general, I feel like I expect nested items in a dropdown to appear on hover rather than on click
cc @crisalbu

)}
</PredefinedCalendarContainer>
) : (
<CalendarRenderer calendarOptions={calendarOptions}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: this can be a variable, perhaps in a useMemo(), to avoid repeating all the props in two places

@ariser ariser dismissed their stale review August 8, 2025 11:44

Going on PTO next week, so I'll dismiss my request to unblock you

@hoorayimhelping hoorayimhelping changed the title DateRangePicker: add ability for predefined ranges DateRangePicker: add ability to use predefined ranges Aug 12, 2025
@hoorayimhelping hoorayimhelping merged commit 2890523 into main Aug 12, 2025
6 checks passed
@hoorayimhelping hoorayimhelping deleted the bucky-daterangepicker-predefined branch August 12, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants