react-component / react-component/picker

antd@4.6.6 rc-picker2.1.0 用dayjs替换moment部分中文不显示的问题

Open
#195 2 comments 3 reactions 0 assignees View on GitHub

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版本是好的

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.