question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No 'for' property set in the datetime html

See original GitHub issue

Causes 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:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jstockwincommented, Apr 30, 2016

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.

0reactions
mxstbrcommented, Apr 30, 2016

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…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found