-
-
Notifications
You must be signed in to change notification settings - Fork 969
fix: allow TimePicker and TimeRangePicker locale prop to override global locale #4333
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
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
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. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4333 +/- ##
==========================================
- Coverage 89.21% 89.20% -0.01%
==========================================
Files 528 528
Lines 12550 12548 -2
Branches 3216 3216
==========================================
- Hits 11196 11194 -2
Misses 677 677
Partials 677 677
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ty and documentation
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.
Pull Request Overview
This PR fixes the issue reported in #4332 by allowing the locale prop on TimePicker and TimeRangePicker to override the global locale settings.
- Added tests to verify custom locale rendering for TimePicker and TimeRangePicker.
- Refactored the locale key mapping in CustomProvider/useCustom.ts to accommodate the changes.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/TimeRangePicker/test/TimeRangePickerSpec.tsx | Added custom locale test for TimeRangePicker. |
| src/TimePicker/test/TimePickerSpec.tsx | Added custom locale test for TimePicker including 'now'. |
| src/CustomProvider/useCustom.ts | Renamed and refactored the locale key function. |
fix: #4332