testing-library / user-event

🐕 Simulate user events
https://testing-library.com/user-event
MIT License
2.19k stars 249 forks source link

userEvent cannot type in date input #1147

Open john-zhang-dev opened 1 year ago

john-zhang-dev commented 1 year ago

Reproduction example

https://codesandbox.io/s/condescending-cartwright-s38f8f?file=/src/App.test.tsx

Prerequisites

  1. Render <input type="date" />
  2. use userEvent to 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

loganripplinger commented 9 months ago

Please see https://github.com/testing-library/testing-library-docs/issues/389#issuecomment-583011925

userEvent works for me with a date input if I use the ISO value, for example '2020-01-30'.