testing-library / testing-library/user-event
userEvent cannot type in date input
Open
Nobody has claimed this yet.
bug
needs assessment
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction example
https://codesandbox.io/s/condescending-cartwright-s38f8f?file=/src/App.test.tsx
Prerequisites
- Render
<input type="date" /> - use
userEventto type in a valid date, e.g. "01012020"
Expected behavior
Date input's value should change as per user input, e.g. "2020-01-01"
Actual behavior
Date input has no value changes
User-event version
14.4.3
Environment
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"jest": "26.6.0",
"react": "18.0.0",
"react-dom": "18.0.0",
Additional context
No response
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 reproduction in src/App.test.tsx from the linked CodeSandbox and run it with the reported user-event version. Trace the date-input typing behavior and verify completion when typing "01012020" changes the input value to "2020-01-01".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100