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
📦 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:
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
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
onChangecallback is not triggered. After the input loses focus (blur), the previous date value re-appears.This behavior is inconsistent with:
onChangewithnull)🔗 Related Issues
📦 Reproduction
Codesandbox: Link to reproduction
Steps to reproduce:
Expected behavior:
onChangeshould be called withnullActual behavior:
onChangeis NOT called ❌📋 Additional Context
This issue affects:
Reopening this issue here recommend by @zombieJ