-
-
Notifications
You must be signed in to change notification settings - Fork 325
fix: remove outdated dateFormat
/ dateTimeFormat
from locale files
#917
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: remove outdated dateFormat
/ dateTimeFormat
from locale files
#917
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
function getProp<T>(propValue: T | T[]): T { | ||
return index !== undefined ? propValue[index] : propValue; | ||
return toArray(propValue)[index || 0]; |
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rc-picker-v4 #917 +/- ##
=============================================
Coverage 98.79% 98.79%
=============================================
Files 64 64
Lines 2651 2651
Branches 736 736
=============================================
Hits 2619 2619
Misses 29 29
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…react-component#917) * fix: remove outdated `dateFormat` from locale files * fix: remove outdated `dateTimeFormat` from locale files * chore: fix lint (cherry picked from commit ca0d9c7) # Conflicts: # src/PickerInput/Selector/hooks/useInputProps.ts
这部分内容其实已经没有用了
fieldDateTimeFormat
在这里 的 fallback 逻辑可能更好,不足之处可能是 前半部分的YYYY-MM-DD
是无法自定义的。而后面的格式化是根据 props 动态生成的, 所以说可能会更好dateFormat
可能会有点用,但是同样根据这里的 的逻辑,如果将其保留并且用fieldDateFormat
替换的话会导致 test 需要调整。 具体我新建了另外一个 PR #918