No 'for' property set in the datetime html
See original GitHub issueCauses testing to fail in #2714
Currently, with two fields, the html is
<div class="FormField field-type-datetime">...</div>
<div class="FormField field-type-datetime">...</div>
whereas it needs to be
<div class="FormField field-type-datetime" for="fieldA">...</div>
<div class="FormField field-type-datetime" for="fieldB">...</div>
Without this, when checking for the fieldB stuff, the testing goes into the first div it matches, which is for fieldA, and then everything fails.
I was thinking the PR would fail the CI checks, but presumably CI is not currently checking datetime. If this PR is merged as is, all future checks will fail.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
<input type="datetime-local"> - HTML - MDN Web Docs
Here we make use of the :valid and :invalid CSS properties to style the input based on whether the current value is valid....
Read more >HTML DOM Time dateTime Property - W3Schools
The datetime attribute gives the date or time being specified. This attribute is used if no date or time is specified in the...
Read more >Bind an input with type datetime-local to a Date property in ...
You can bind to a date using the following format: yyyy-MM-ddTHH:mm , which you can also get from date.toISOString().slice(0,16) (the slice removes the...
Read more >HTML | DOM Input Datetime required Property - GeeksforGeeks
The Input Datetime required property is used to check whether a datetime field must be filled out or not before submitting a form....
Read more >HTML DOM Input Datetime required Property - Tutorialspoint
The HTML DOM Input Datetime required property determines whether Input Datetime is compulsory to set or not.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is all for work on #2291. I’d probably defer to @webteckie for a definitive answer on where to go, but personally I would do the following:
I could make a new PR which only concerns itself with FieldA for now. I’d say that’s a good temporary solution, as it still does some testing on the datetime field, while circumventing this issue. Then when this issue is closed, we can add fieldB back into the testing.
Well not really, since we’d need to render the field with a
for
property which I don’t think we do at the moment, but maybe I’m missing something here…