-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support .clear()
on date inputs
#2738
Labels
Milestone
Comments
Have confirmed, this does error when trying to clear a date field and it should not error. cy.get('input').type('2019-08-07')
cy.get('input').clear() |
jennifer-shehane
added
type: bug
pkg/driver
This is due to an issue in the packages/driver directory
labels
Nov 14, 2018
chrisbreiding
pushed a commit
that referenced
this issue
Nov 20, 2018
- Fixes #2738 Think directly setting this value might overstep something that's happening in type, but not entirely sure.
This has been fixed and we'll update the issue and the changelog when it's released. |
@lilaconlee Look like this was released in 3.1.5 however I don't see that noted in the changelog. |
Thanks @aciccarello, this was released in 3.1.5. The changelog has been updated to reflect this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
.clear()
on a date field should clear the value rather than causing an error. This may affect other field types.Related StackOverflow question
Current behavior:
The
.clear()
command is an alias for.type({selectall}{backspace})
. However, typing in date fields is limited to strings matching the date format. This causes Cypress to throw an error.Desired behavior:
The type command should allow
{selectall}{del}
for date inputs and clear the input value.Versions
Tested on Cypress 3.1.0
The text was updated successfully, but these errors were encountered: