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

fix(DatePicker): fix inconsistency between month selectable state and ok button clickable state #2984

Merged
merged 1 commit into from
Dec 27, 2022

Conversation

SevenOutman
Copy link
Member

@SevenOutman SevenOutman commented Dec 21, 2022

The issue

This example on rsuitejs.com shows that current month (2022-12) is selectable, but when it's selected the OK button is disabled.

image

<DatePicker
  format="yyyy-MM"
  disabledDate={date => isBefore(date, new Date())}
/>

Reason

The select date button is disabled only when every date in that month is disabled, but the OK button is disabled when the selected date is disabled.

@vercel
Copy link

vercel bot commented Dec 21, 2022

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

Name Status Preview Comments Updated
rsuite-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Dec 21, 2022 at 8:18AM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
rsuite-v4 ⬜️ Ignored (Inspect) Dec 21, 2022 at 8:18AM (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 d3dfc4d:

Sandbox Source
rsuite-tp-ci Configuration

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Base: 93.09% // Head: 93.09% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (d3dfc4d) compared to base (c89da7f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2984   +/-   ##
=======================================
  Coverage   93.09%   93.09%           
=======================================
  Files         558      558           
  Lines       20058    20068   +10     
  Branches     2718     2719    +1     
=======================================
+ Hits        18672    18682   +10     
  Misses        734      734           
  Partials      652      652           
Flag Coverage Δ
ChromeCi 93.05% <100.00%> (+<0.01%) ⬆️
Firefox 92.34% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/Calendar/MonthDropdown.tsx 97.77% <100.00%> (+0.05%) ⬆️
src/DatePicker/DatePicker.tsx 93.75% <100.00%> (+0.17%) ⬆️
src/DatePicker/test/DatePickerSpec.tsx 99.72% <100.00%> (+<0.01%) ⬆️

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@SevenOutman SevenOutman merged commit 70e6aba into main Dec 27, 2022
@SevenOutman SevenOutman deleted the fix/DatePicker-disabledMonth branch December 27, 2022 07:22
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