Skip to content
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

Daterangepicker limit start year #3163

Merged
merged 3 commits into from
Apr 20, 2023

Conversation

loposkin
Copy link
Contributor

CHANGES

Added limitStartYear prop to DatePicker and DateRangePicker. Usage:

Display current year only:

<DateRangePicker
          limitEndYear={1}
          limitStartYear={1}
          ...
>

Display years between previous and next year:

<DateRangePicker
          limitEndYear={2}
          limitStartYear={2}
          ...
>

This looks like:
limit_start_year

If unset, the start year still defaults to 1900

ISSUE

close #3145

@vercel
Copy link

vercel bot commented Apr 17, 2023

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

Name Status Preview Comments Updated (UTC)
rsuite-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2023 5:48am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rsuite-v4 ⬜️ Ignored (Inspect) Apr 18, 2023 5:48am

@vercel
Copy link

vercel bot commented Apr 17, 2023

@loposkin is attempting to deploy a commit to the rsuite Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 17, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 500a0e0:

Sandbox Source
rsuite-tp-ci Configuration

@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (786e930) 93.43% compared to head (500a0e0) 93.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3163      +/-   ##
==========================================
+ Coverage   93.43%   93.44%   +0.01%     
==========================================
  Files         562      562              
  Lines       20395    20415      +20     
  Branches     2739     2739              
==========================================
+ Hits        19056    19077      +21     
  Misses        694      694              
+ Partials      645      644       -1     
Flag Coverage Δ
ChromeCi 93.40% <100.00%> (+0.01%) ⬆️
Firefox 92.70% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Calendar/CalendarContainer.tsx 100.00% <ø> (ø)
src/DatePicker/DatePicker.tsx 94.63% <ø> (ø)
src/DateRangePicker/Calendar.tsx 96.55% <ø> (ø)
src/DateRangePicker/DateRangePicker.tsx 88.03% <ø> (ø)
src/Calendar/MonthDropdown.tsx 100.00% <100.00%> (+2.22%) ⬆️
src/Calendar/test/CalendarMonthDropdownSpec.tsx 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@SevenOutman SevenOutman left a comment

Choose a reason for hiding this comment

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

@loposkin Thank you!

LGTM. I'll push a commit to add the new prop in Chinese doc, and the PR is going to be merged.

@SevenOutman SevenOutman merged commit fd27df2 into rsuite:main Apr 20, 2023
7 checks passed
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.

Limit start year for DateRangePicker
2 participants