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 |
| 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.
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
| <tr> | ||
| <td | ||
| class="rc-picker-cell" | ||
| title="1990-08-26" |
There was a problem hiding this comment.
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