-
-
Notifications
You must be signed in to change notification settings - Fork 318
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: week range disabled rule #177
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/picker/kw46mlfzr |
Codecov Report
@@ Coverage Diff @@
## master #177 +/- ##
=======================================
Coverage 99.60% 99.60%
=======================================
Files 45 45
Lines 2025 2030 +5
Branches 590 600 +10
=======================================
+ Hits 2017 2022 +5
Misses 6 6
Partials 2 2
Continue to review full report at Codecov.
|
tests/generate.spec.tsx
Outdated
'en_US', | ||
generateConfig.locale.parse('en_US', '2020-12-30', [formatStr]), | ||
), | ||
).toEqual(1609027200000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1609027200000 这个地方可以改一下,应该表示 2020-12-27 的 value吧。这样清楚一些。
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
done. |
🔗 Related issue link
Resolve #27879
💡 Background and solution
When you click
2020-12-27 ~ 2020-12-31
these days to select2021 - 1st
as end week, all the weeks before are disabled.Previously, we use
weekNumber
for comparison, it works well in most cases. But when you click these days e.g.2020-12-30
, it will return202001
, which is smaller than the weeks before in 2020, and result in these weeks are disabled.🎈 Results
Before:
After: