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

<input type="month"> - IDL attributes : missing valueAsDate and valueAsNumer #31590

Closed
Malix-off opened this issue Jan 6, 2024 · 13 comments · Fixed by #31639
Closed

<input type="month"> - IDL attributes : missing valueAsDate and valueAsNumer #31590

Malix-off opened this issue Jan 6, 2024 · 13 comments · Fixed by #31639
Labels
Content:HTML Hypertext Markup Language docs

Comments

@Malix-off
Copy link
Contributor

Malix-off commented Jan 6, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month

What specific section or headline is this issue about?

Technical Summary

What information was incorrect, unhelpful, or incomplete?

About <input type="month"> : IDL attributes - missing valueAsDate and valueAsNumer

What did you expect to see?

About <input type="month"> : IDL attributes - missing valueAsDate and valueAsNumer

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@hamishwillee
Copy link
Collaborator

The table is "Supported common attributes" so are these supported on any browser on the input element, and are they common to many types of input elements? If not, then they wouldn't appear here.

More generally, if you look at the browser compatibility they aren't listed: htps://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#browser_compatibility - this is a strong indication that they aren't supported on any of our tracked browsers.

If you think they are, then can you please provide a test case that demonstrate said support, and we would move this to browser compatibility data repo to proceed.

@Malix-off
Copy link
Contributor Author

Malix-off commented Jan 8, 2024

@hamishwillee
Available on most of my chromium browser currently

To test, input this in your browser inspector console:

let input = document.createElement("input");
input.type = "month";
input.id = "test";
document.body.appendChild(input);

let test = document.getElementById("test").valueAsDate;

console.log(test); // or just `test` in the browser console

It outputs null (default valueAsDate value) !== undefined

@hamishwillee hamishwillee transferred this issue from mdn/content Jan 8, 2024
@hamishwillee
Copy link
Collaborator

BCD team - the two HTML input values valueAsDate and valueAsNumber are not in BCD. As per above, they may be supported in some browsers. If so, we can document them once BCD confirms this and is updated.

@queengooborg
Copy link
Collaborator

Actually, this is a case of looking at the wrong page/table. The IDL values are tracked on the API page, not the HTML element page. If you look at the HTMLInputElement API page, you'll see both valueAsDate and valueAsNumber there.

@queengooborg queengooborg closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
@Malix-off
Copy link
Contributor Author

Malix-off commented Jan 8, 2024

@queengooborg
Copy link
Collaborator

You're looking on the wrong page. You want to look at https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#browser_compatibility instead, which describes the interface and its features. We don't document IDL attributes in the HTML data; we only document HTML attributes there.

@Malix-off
Copy link
Contributor Author

Malix-off commented Jan 8, 2024

@queengooborg

You're looking on the wrong page. You want to look at developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#browser_compatibility instead, which describes the interface and its features. We don't document IDL attributes in the HTML data; we only document HTML attributes there.

Why are there present in every other input elements, then?
Exemple: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date#technical_summary

@queengooborg
Copy link
Collaborator

queengooborg commented Jan 8, 2024

Oh, wait- you're not talking about the browser compatibility section... Hold on, let me transfer this issue back to the content repo.

@queengooborg queengooborg reopened this Jan 8, 2024
@queengooborg queengooborg transferred this issue from mdn/browser-compat-data Jan 8, 2024
@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jan 8, 2024
@queengooborg
Copy link
Collaborator

@hamishwillee This was not a BCD issue. The reporter is referring to the " row within the Technical Summary section of the page:

Screenshot 2024-01-08 at 15 52 48

BCD would not list these under the HTML element data because they are API attributes, not HTML element attributes, so they would not appear in the browser compatibility tables on these pages.

@Malix-off
Copy link
Contributor Author

Malix-off commented Jan 9, 2024

Indeed, sorry for not clarifying earlier, I had no idea of what "BCD" meant

@hamishwillee
Copy link
Collaborator

Curses. Thanks all - I was confused by this. @Malix-off - would you like to add those attributes?

@Malix-off
Copy link
Contributor Author

Malix-off commented Jan 9, 2024

Curses. Thanks all - I was confused by this. @Malix-off - would you like to add those attributes?

Np!
Yep, if you allow PRs.
I'm busy bc of exams, but will eventually open the PR for review before Thursday afternoon UTC

@Malix-off
Copy link
Contributor Author

@bsmth bsmth removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs
4 participants