[ic-date-picker] - clearing field behaviour does not match other components
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary of the bug
When used on a ic-dialog, clearing the date-picker value using the "X" button in the input does not match the behaviour of other components eg ic-date-input, ic-select
## 🪜 How to reproduce
Tell us the steps to reproduce the problem:
1. Go to [stackblitz example](https://stackblitz.com/edit/tpzjfrzg-crv6ofw4?file=src%2Fapp.jsx,package.json&hideExplorer=1)
2. Open the dialog
3. Click "X" to clear date in datepicker
4. Click "X" to clear date in date input
5. Click "X" to clear value in select
6. Click the dialog "Cancel" button
7. Open the dialog again
8. See that the date-input and select have reset back to the original values, but the datepicker hasn't

## 🧐 Expected behaviour
The date-picker should reset in the same way as the other components
## Additional info
The value does reset to the original if you select a different value from the picker & then cancel the dialog & reopen
Contributor guide
Research direction
Start with the StackBlitz reproduction, especially src/app.jsx and package.json, and verify the differing reset behaviour after cancelling and reopening the dialog. Trace the date-picker usage alongside the date-input and select cases. Done means clearing the date-picker with the input X resets to its original value after Cancel, matching the other components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100