Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

DatePicker does not trigger onChange when manually clearing input text

オープン
#946 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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 onChange with null)
  • User expectations (manual deletion should clear the value)
🔗 Related Issues
  • ant-design/ant-design#52473
📦 Reproduction

Codesandbox: Link to reproduction

Steps to reproduce:

  1. Render a Picker with a value (e.g., "2023-08-01")
  2. Click in the input field
  3. Select all text (Ctrl+A / Cmd+A)
  4. Press Delete or Backspace to clear the text
  5. Click outside the input (trigger blur)

Expected behavior:

  • onChange should be called with null
  • Input should remain empty
  • Value should be cleared

Actual behavior:

  • onChange is 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-component/picker のほかの issue

react-component/picker の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。