Intent to Prototype: HTMLInputElement showPicker()

236 views
Skip to first unread message

François Beaufort 🇫🇷

unread,
Nov 3, 2021, 3:24:08 PM11/3/21
to blink-dev

Contact emails

fbea...@google.com


Explainer

None yet; see https://github.com/whatwg/html/issues/6909#issuecomment-956747809 for a rough explanation of the behavior, which we will turn into a proper explainer before shipping.


Specification

None yet (will be specified in whatwg/html)


Summary

The HTMLInputElement showPicker() method allows web developers to programmatically show a browser picker for temporal, color, and file inputs.


Blink component

Blink>Forms


Motivation

Developers have been asking for years for a way to programmatically open a browser date picker. See https://www.google.com/search?q=programmatically+open+date+picker+site:stackoverflow.com

Because of that, they had to rely on custom widget libraries and CSS hacks for specific browsers.


Initial public proposal

https://github.com/whatwg/html/issues/6909


TAG review

None yet; we will file during the prototyping phase once an explainer/spec draft is ready.


TAG review status

Pending


Risks


Interoperability and Compatibility


Gecko: No official signal yet; general agreement this seemed like a reasonable idea on the HTML triage call. See https://github.com/whatwg/html/issues/6936


WebKit: No signal


Web developers: No signal


Is this feature fully tested by web-platform-tests?

No. We are able to test the error case behaviors but the actual showing of the picker is not testable using WPT.


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=939561


Estimated milestones

No milestones specified


Link to entry on the Chrome Platform Status

https://www.chromestatus.com/feature/5692248021794816


This intent message was generated by Chrome Platform Status.


Mike Taylor

unread,
Nov 9, 2021, 10:48:03 AM11/9/21
to François Beaufort 🇫🇷, blink-dev
Hi François,

On 11/3/21 3:16 PM, 'François Beaufort 🇫🇷' via blink-dev wrote:

Summary

The HTMLInputElement showPicker() method allows web developers to programmatically show a browser picker for temporal, color, and file inputs.


Blink component

Blink>Forms


Motivation

Developers have been asking for years for a way to programmatically open a browser date picker. See https://www.google.com/search?q=programmatically+open+date+picker+site:stackoverflow.com

Because of that, they had to rely on custom widget libraries and CSS hacks for specific browsers.

This is really cool - thanks for working on it. I was just thinking about the EyeDropper API proposal, which references input[type=color] in https://github.com/WICG/eyedropper-api/blob/main/README.md#extending-inputtypecolor.

As a developer, it would be kind of nice to only have one method to keep in my head - did you consider aligning the method name w/ the EyeDropper API? (Also, if we did decide there was a use case for <select>, open() would be less awkward than HTMLSelectElement.showPicker).

later,
Mike

Domenic Denicola

unread,
Nov 9, 2021, 10:49:51 AM11/9/21
to Mike Taylor, François Beaufort 🇫🇷, blink-dev
These seem like good discussions to have on the spec thread, instead of a Blink-specific mailing list :).
 

later,
Mike

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/1b089863-3fe7-573c-a094-e5bcc1bb9aff%40chromium.org.

Mike Taylor

unread,
Nov 9, 2021, 11:05:58 AM11/9/21
to Domenic Denicola, François Beaufort 🇫🇷, blink-dev
On 11/9/21 10:49 AM, Domenic Denicola wrote:
These seem like good discussions to have on the spec thread, instead of a Blink-specific mailing list :).

Sure, I guess I don't feel strongly about the venue - but re-posted at https://github.com/whatwg/html/issues/6909#issuecomment-964292294.

Reply all
Reply to author
Forward
0 new messages