Skip to content

fix(DatePicker): use German date formats - #59151

Merged
yoyo837 merged 3 commits into
ant-design:masterfrom
nrps9909:codex/german-date-format
Sep 7, 2026
Merged

yoyo837 merged 3 commits into
ant-design:masterfrom
nrps9909:codex/german-date-format

Conversation

@nrps9909

@nrps9909 nrps9909 commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

Closes #59149

💡 Background and Solution

The German DatePicker locale inherited the generic YYYY-MM-DD fallback, so a value such as January 1, 2000 was displayed as 2000-01-01 instead of the standard German 01.01.2000. The date-time fallback had the same ordering issue.

This change defines the German date and 24-hour date-time formats already used by the repository's Day.js German locale. It also adds focused coverage through the public ConfigProvider locale path for both DatePicker and DatePicker with showTime, and updates the generated locale snapshots.

Validation:

  • Exact-base regression: expected 01.01.2000, received 2000-01-01
  • Focused Vitest: 85 tests passed before the latest rebase; 9/9 focused tests passed after rebase
  • Focused ESLint and Biome checks passed
  • git diff --check passed
  • Exact-head GitHub checks passed, including React legacy/latest, lib/es, dist, coverage, lint, build, and visual regression

📝 Change Log

Language Changelog
🇺🇸 English DatePicker uses standard German date (DD.MM.YYYY) and date-time (DD.MM.YYYY HH:mm:ss) formats with the German locale.
🇨🇳 Chinese DatePicker 在德语地区设置下使用标准德语日期(DD.MM.YYYY)和日期时间(DD.MM.YYYY HH:mm:ss)格式。

AI assistance disclosure: Codex was used to trace the locale merge path, audit overlapping open PR files, reproduce the regression, run validation, investigate the unrelated CI dependency failure, and draft this report. I verified the final diff, commands, and results.

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Preview is ready

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

👁 Visual Regression Report for PR #59151 Passed ✅

🎯 Target branch: master (c0972ce)
📖 View Full Report ↗︎
📖 Alternative Report ↗︎

🎊 Congrats! No visual-regression diff found.

📖 中文报告

👁 PR #59151 视觉回归报告 通过 ✅

🎯 目标分支: master (c0972ce)

🎊 恭喜!未发现视觉回归差异。

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 65f56801-0521-44a7-bfb3-52aa57c38238

📥 Commits

Reviewing files that changed from the base of the PR and between 47e2d80 and a8c43e1.

📒 Files selected for processing (1)
  • components/date-picker/locale/de_DE.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Summary

Summary by CodeRabbit

  • 新功能

    • 德语区域设置下,日期选择器现在使用 DD.MM.YYYY 格式显示日期。
    • 启用时间选择后,日期时间显示为 DD.MM.YYYY HH:mm:ss 格式,提升德语用户输入和查看日期时间的一致性。
  • 测试

    • 增加了德语日期及日期时间格式的验证,确保显示结果符合预期。

Walkthrough

本次变更为德语 DatePicker locale 添加日期和日期时间格式,并新增测试验证 ConfigProvider 使用 deDE 时的输入值。

Changes

德语日期格式

Layer / File(s) Summary
Locale 格式与 DatePicker 验证
components/date-picker/locale/de_DE.ts, components/date-picker/__tests__/other.test.tsx
de_DE 新增 DD.MM.YYYY 和 DD.MM.YYYY HH:mm:ss 格式。测试验证普通日期和启用 showTime 时的输入值。

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a8c43

German DatePicker inputs now render dates as DD.MM.YYYY and date-times in 24-hour format. The targeted behavior is covered, with no remaining current-head merge risk identified.

Suggested reviewers: stop1love1

Poem

小兔调整日期盘,
德语格式排整齐。
日月年清晰显示,
时分秒准确跟随。
测试轻敲输入框,
兔耳欢快摇起来。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题明确说明了 DatePicker 德语日期格式修复,与变更内容直接相关。
Description check ✅ Passed 描述说明了 German DatePicker locale 的问题、修复方案、测试覆盖范围和验证结果,与变更内容相关。
Linked Issues check ✅ Passed 变更在 de_DE locale 中新增 fieldDateFormat: "DD.MM.YYYY",直接满足 issue #59149 的要求。新增 dateTime 格式和 ConfigProvider 测试也支持该修复。
Out of Scope Changes check ✅ Passed 提供的变更均围绕 German DatePicker locale 格式修复和回归测试。未发现与 issue #59149 或 PR 目标无关的代码变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai
coderabbitai Bot requested a review from li-jia-nan August 28, 2026 12:50
@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
More templates

npm i https://pkg.pr.new/antd@59151

commit: a8c43e1

@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 71 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
antd.min-array-push 3.23MB 71 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: antd.min-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
antd-with-locales.min.js 71 bytes 1.8MB 0.0%

@nrps9909

Copy link
Copy Markdown
Contributor Author

CI root-cause update: the six Tooltip failures are reproducible as an nwsapi 2.2.25 regression, not a DatePicker change. PR #59150 independently failed the same two shards and the same six tests after that release. On this PR exact head, the affected files fail 6/55 with 2.2.25 and pass 55/55 (5 snapshots) with 2.2.24 or the focused guard restored. I reported the upstream regression at dperini/nwsapi#168 and submitted the fix at dperini/nwsapi#169. No DatePicker code change is needed for this failure; the check should be retried after the dependency is fixed or pinned. AI assistance disclosure: Codex helped trace the dependency and run the A/B verification; I reviewed and reproduced the results locally.

@yoyo837

yoyo837 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

CI failed.

@nrps9909

Copy link
Copy Markdown
Contributor Author

Confirmed. The failed shards are the six Tooltip tests described above. I checked the newly published nwsapi 2.2.26 before rerunning: a clean jsdom 26.1.0 install still throws the same TypeError for the compound selector and root :has(~ p), so rerunning now would remain deterministically red. The upstream fix is rebased onto current nwsapi master at signed/Verified head e33a8ae: dperini/nwsapi#169. I will rerun this PR after a fixed upstream release rather than add an unrelated DatePicker dependency pin. AI assistance disclosure: Codex helped run the clean-install 2.2.26 probe; I verified the result locally.

@nrps9909
nrps9909 force-pushed the codex/german-date-format branch from 47e2d80 to 238ec0f Compare August 29, 2026 04:09
@nrps9909

Copy link
Copy Markdown
Contributor Author

Thanks for flagging this. I rebased the PR onto current master and force-pushed signed commit 238ec0f309 (GitHub Verified), which started a fresh CI run.

The previous failures were six Tooltip tests failing inside nwsapi (Cannot read properties of null (reading 'children')), outside this DatePicker locale diff. After the rebase I locally verified:

  • vitest components/date-picker/__tests__/other.test.tsx: 9/9 passed
  • focused ESLint: passed
  • focused Biome: passed
  • git diff --check: passed

I will leave the new CI run to complete without further retriggers. AI assistance was used to inspect the failed-job logs and prepare the rebase/validation summary; the exact diff and commands were verified locally.

@QDyanbing

Copy link
Copy Markdown
Member

Please use the official PR template and complete the bilingual Change Log section; otherwise, release changelog collection will be affected.

@QDyanbing QDyanbing mentioned this pull request Aug 29, 2026
1 task done
@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c0972ce) to head (a8c43e1).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #59151   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          834       834           
  Lines        15991     15991           
  Branches      4202      4202           
=========================================
  Hits         15991     15991           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nrps9909

Copy link
Copy Markdown
Contributor Author

Thanks for the guidance. I updated the PR description to the official template and completed both the English and Chinese Change Log entries. The existing AI assistance disclosure remains included in the description.

@yoyo837
yoyo837 merged commit 9e9d2d5 into ant-design:master Sep 7, 2026
42 checks passed
@yoyo837 yoyo837 mentioned this pull request Sep 7, 2026
1 task done
ffgenius pushed a commit to antdv-next/antdv-next that referenced this pull request Sep 9, 2026
Sync ant-design/ant-design#59151: add fieldDateFormat and fieldDateTimeFormat to the de_DE picker locale so DatePicker renders DD.MM.YYYY under the German ConfigProvider locale.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local de_DE fieldDateFormat not correct

3 participants