react-component / react-component/picker
antd@4.6.6 rc-picker2.1.0 用dayjs替换moment部分中文不显示的问题
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 304
- Forks
- 345
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 7
Description
import dayjs, { Dayjs } from 'dayjs';
import dayjsGenerateConfig from 'rc-picker/lib/generate/dayjs';
import generatePicker from 'antd/es/date-picker/generatePicker';
import 'antd/es/date-picker/style/index';
import 'dayjs/locale/zh-cn'
dayjs.locale('zh-CN')
const DatePicker = generatePicker<Dayjs>(dayjsGenerateConfig);
export default DatePicker;
我替换rc-picker@1.6.1版本是好的

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with rc-picker 2.1.0 using the shown TypeScript setup, starting at the rc-picker/lib/generate/dayjs entry point and comparing it with rc-picker 1.6.1. Check how the imported dayjs Chinese locale is consumed; the issue is done when the picker displays its Chinese text with the newer version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100