whatwg / whatwg/html

Date picker access in contenteditable elements

Open
#8,335 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

addition/proposal needs implementer interest
Dominant language
HTML
Stars
9.4k
Forks
3.2k
PR merge metrics
PR metrics pending

Description

The datepicker API is currently only accessible via the HTMLInputElement. In some cases, developers need to use the contenteditable attribute to allow user input for alternative element types such as the HTMLDivElement, however datepicker is unfortunately not accessible to them.

The ability for developers to access a cross-platform capable, unified design date picker without having to download a third-party library is extremely powerful. I utmost understand that such a feat does not come without having to deal with 100s of different use-cases and the issues that come with each one, but I wanted to ask if facilitating the access of its API for the contenteditable elements was anywhere on your roadmap as this is an issue that I am facing upfront and I believe other devs will run into this use-case in the future as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing datepicker API and the contenteditable use case described in the issue. Clarify the desired cross-platform behavior and scope for non-input elements, then identify the relevant standard entry points and tests; done would require an agreed specification and corresponding standard changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.