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

feat(DateRangePicker): supports placing predefined ranges on the left #2670

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

simonguo
Copy link
Member

@simonguo simonguo commented Aug 24, 2022

<DateRangePicker
  ranges={[
    {
      label: 'Today',
      value: [new Date(), new Date()],
+     // Sets the position where the predefined range is displayed, the default is bottom.
+     // Only supported on DateRangePicker。
+     placement: 'left'
    }
  ]}
/>;

https://rsuite-nextjs-git-feat-daterangepicker-rsuite.vercel.app/components/date-range-picker/#predefined-date-ranges

image

image

@vercel
Copy link

vercel bot commented Aug 24, 2022

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

Name Status Preview Updated
rsuite-nextjs ✅ Ready (Inspect) Visit Preview Aug 24, 2022 at 2:14PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
rsuite-v4 ⬜️ Ignored (Inspect) Aug 24, 2022 at 2:14PM (UTC)

@codesandbox-ci
Copy link

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 b6bb14d:

Sandbox Source
rsuite-tp-ci Configuration

@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #2670 (b6bb14d) into main (2280e0e) will decrease coverage by 0.00%.
The diff coverage is 90.62%.

@@            Coverage Diff             @@
##             main    #2670      +/-   ##
==========================================
- Coverage   85.50%   85.49%   -0.01%     
==========================================
  Files         294      295       +1     
  Lines        9102     9110       +8     
  Branches     2567     2569       +2     
==========================================
+ Hits         7783     7789       +6     
  Misses        694      694              
- Partials      625      627       +2     
Flag Coverage Δ
ChromeCi 85.49% <90.62%> (-0.01%) ⬇️
Firefox 85.47% <90.62%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/DatePicker/PredefinedRanges.tsx 86.66% <86.66%> (ø)
src/DateRangePicker/DateRangePicker.tsx 87.80% <87.50%> (-0.58%) ⬇️
src/DatePicker/Toolbar.tsx 100.00% <100.00%> (+7.14%) ⬆️

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

@SevenOutman
Copy link
Member

Does this edit change the current appearance ("link"-like) of the shortcuts on the bottom toolbar?

@simonguo
Copy link
Member Author

Does this edit change the current appearance ("link"-like) of the shortcuts on the bottom toolbar?

The style of the bottom button was not changed. It was customized in this demo.

@SevenOutman SevenOutman merged commit 8df4a61 into main Aug 26, 2022
@SevenOutman SevenOutman deleted the feat/DateRangePicker branch August 26, 2022 03:04
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.

None yet

2 participants