DatePicker does not trigger onChange when manually clearing input text
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンクされている CodeSandbox の再現コードから始め、単一ピッカーと範囲ピッカーについて、手動削除とクリアボタンの動作を比較します。入力をクリアすると null を伴って onChange が発火し、blur 後も入力が空のままになり、一覧にあるピッカーモード全体で動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue for react-component/picker
Title: DatePicker does not trigger onChange when manually clearing input text
🐛 Bug Report
rc-picker version: 4.11.3 (also affects latest versions)
📝 Description
When a user manually selects and deletes the date text in a Picker input field (by selecting all text and pressing delete/backspace), the onChange callback is not triggered. After the input loses focus (blur), the previous date value re-appears.
This behavior is inconsistent with:
- Clicking the clear button (which properly triggers
onChangewithnull) - User expectations (manual deletion should clear the value)
🔗 Related Issues
- ant-design/ant-design#52473
📦 Reproduction
Codesandbox: Link to reproduction
Steps to reproduce:
- Render a Picker with a value (e.g., "2023-08-01")
- Click in the input field
- Select all text (Ctrl+A / Cmd+A)
- Press Delete or Backspace to clear the text
- Click outside the input (trigger blur)
Expected behavior:
onChangeshould be called withnull- Input should remain empty
- Value should be cleared
Actual behavior:
onChangeis NOT called ❌- Input resets to the previous value ("2023-08-01")
- Value is not cleared
📋 Additional Context
This issue affects:
- ✅ Single date picker
- ✅ Range picker (both inputs)
- ✅ All picker modes (date, week, month, year, quarter, time)
Reopening this issue here recommend by @zombieJ
- 主要言語
- TypeScript
- スター
- 304
- フォーク
- 347
- 平均マージ
- 19時間 37分
- マージ済み PR(30日)
- 6
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/picker のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
react-component/picker#956 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
react-component/picker#955 · コメント 1 件 · リアクション 1 件 ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolutionオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
react-component/picker#949 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
react-component/picker#939 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
react-component/picker#937 · コメント 1 件 ·
react-component/picker の issue をすべて見る
似ている issue
-
area/frontend good first issue kind/cooldown
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
voidzero-dev/oxc-angular-compiler#511 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
langchain-ai/deepagentsjs#898 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
anomalyco/models.dev#8509 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation P2 UI/UX
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信