-
-
Notifications
You must be signed in to change notification settings - Fork 326
Format titleCell with locale #312
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
base: master
Are you sure you want to change the base?
Format titleCell with locale #312
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/picker/DANeVMS6fUmJdFfUwGtQUK8tKtQN |
Regarding the coverage, it is a breaking change due to the current locales, I will look into why |
@@ -3,6 +3,8 @@ import { getLowerBoundTime, setTime, getLastDay } from '../src/utils/timeUtil'; | |||
import { toArray } from '../src/utils/miscUtil'; | |||
import { isSameTime, isSameDecade } from '../src/utils/dateUtil'; | |||
import { getMoment } from './util/commonUtil'; | |||
import koKR from '../src/locale/ko_KR'; |
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.
I only used koKR to keep some continuation with the previous implementation 'YYYY-MM-DD'
Codecov Report
@@ Coverage Diff @@
## master #312 +/- ##
==========================================
- Coverage 99.52% 99.52% -0.01%
==========================================
Files 45 45
Lines 2118 2117 -1
Branches 627 627
==========================================
- Hits 2108 2107 -1
Misses 8 8
Partials 2 2
Continue to review full report at Codecov.
|
The locale should be present if picker isn't a year picker
@@ -178,7 +178,7 @@ exports[`Picker.Panel should render correctly in rtl 1`] = ` | |||
<tr> | |||
<td | |||
class="rc-picker-cell" | |||
title="1990-08-26" |
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.
I think that this behavior wise is a breaking change, so it needs to be handled/notified carefully although at the same time it will give a better experience to the user.
I just noticed that there are harcoded defaults in other places/not using the locale (enGB) e.g. RangePicker Line 147 in 8bc4cce
I can try to understand how we can use the locales for that too, I assumed that the code was using a default locale but that's not the case. Can you give me some hint on why it was structured this way/can I bring some suggestion to the table regarding this? |
ad4a9c8
to
b7dc951
Compare
I encountered the same issue as ant-design/ant-design#31339
Alternative solution to #273