Skip to content
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

Cannot type on datetime-local input #2613

Closed
jcAxe opened this issue Oct 15, 2018 · 10 comments · Fixed by #4870
Closed

Cannot type on datetime-local input #2613

jcAxe opened this issue Oct 15, 2018 · 10 comments · Fixed by #4870
Assignees
Labels
stage: ready for work The issue is reproducible and in scope type: bug
Milestone

Comments

@jcAxe
Copy link

jcAxe commented Oct 15, 2018

Hi, i'm trying to type on an input of datetime-local type.
On the documentation, it says that datetime-local is supported but nothing was never typed, no matter how I tried to type it type.('10102019{rightarrow1010pm}',type.('000000000000pm}').
Also, in this #1366 issue has a workaround. but both did not work.
It does select the input, but never types.

@jcAxe jcAxe changed the title Typing on datetime-local input Cannot type on datetime-local input Oct 15, 2018
@jennifer-shehane
Copy link
Member

Hi @Keryar, are you seeing any errors with the type commands you wrote?

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Oct 15, 2018
@jcAxe
Copy link
Author

jcAxe commented Oct 16, 2018

No errors, the cy.get() returns the input, and the .type() apparently types, because it goes through as it really typed. But nothing is displayed.

@sadplace
Copy link

Hi, i also have the same problem. I try all combinations of date i can remember.
The documentation says about date and time inputs but not datetime. Is that working? If yes can you give us an example?

Thanks

@jcAxe
Copy link
Author

jcAxe commented Oct 26, 2018

I think the difference here in this case from others I had is that this one acts like everything went fine, even though nothing was writen.

@sadplace
Copy link

sadplace commented Nov 1, 2018

So, i did some more tests and this is what i found out:
Code:

cy
  .get("input[type=\"datetime-local\"]:first")
  .type("1959-09-13T10:10");
Error:
The specified value "1" does not conform to the required format
The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
The specified value "9" does not conform to the required format
The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
The specified value "5" does not conform to the required format
The format is "yyyy-MM-ddThh:mm" followed by optional ":ss" or ":ss.SSS".
... for all numbers of datetime

I have tried with input type date and works fine

@kuceb kuceb self-assigned this Nov 20, 2018
@sadplace
Copy link

sadplace commented Dec 4, 2018

Any news on this?

@jennifer-shehane jennifer-shehane added stage: needs investigating Someone from Cypress needs to look at this and removed stage: needs information Not enough info to reproduce the issue labels Dec 6, 2018
@kuceb kuceb mentioned this issue Dec 6, 2018
5 tasks
@kuceb
Copy link
Contributor

kuceb commented Dec 6, 2018

@sadplace yes, this is going in along with native events #2436

@kuceb kuceb added this to the Sprint 14 milestone Dec 6, 2018
@jennifer-shehane jennifer-shehane added stage: in progress and removed stage: needs investigating Someone from Cypress needs to look at this labels Jan 16, 2019
@ns412
Copy link

ns412 commented Sep 28, 2019

Just wanted to check in as well -- has this been fixed? I'm having a similar issue with the same console log. Including it here.

image

I'm checking this documentation out as well and datetime-local doesn't have supplementary info. But I'm assuming the format is yyyy-MM-ddThh:mm because that's what the console says.

https://docs.cypress.io/api/commands/type.html

The date input works fine!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

The code for this is done in cypress-io/cypress#4870, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage: ready for work The issue is reproducible and in scope type: bug
Projects
None yet
5 participants