marmelab / marmelab/react-admin
DateInput validation doesn't work when DateInput is used as a Filter
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 26.9k
- Forks
- 5.5k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 19
Description
What you were expecting:
When adding validation to the date input (like ensuring the date is in the past/future), I would expect it to display the correct helper text underneath the component.
What happened instead:
Instead no message is present, and the date input reverts to the last valid input, which in this case is the removes the last key stroke.
Steps to reproduce:
I've created a repro case here
And a video too
- Preferably, a CodeSandbox forked from https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple
- A link to a GitHub repo with the minimal codebase to reproduce the issue
insert short code snippets here
Other information:
Environment
- React-admin version: 3.16.2
- Last version that did not exhibit the issue (if applicable):
- React version: 17.0.2
- Browser:
- Stack trace (in case of a JS error):
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked repro repository on the repro/date-validation branch and inspect the DateInput usage as a Filter. Reproduce the validation case and compare the missing helper text with the input reverting to its last valid value. Done means the validation message appears beneath the component without removing the latest keystroke.
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
- 35/100