Date Input #2394
Closed
rubber-duck-software
started this conversation in
Ideas
Date Input
#2394
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A custom date input component is a very common need in a project and so several component libraries include this in their standard set of components. See
Now, if HTML includes a
<input type="date" />
why do component libraries feel the need to reinvent the wheel. Simply put, the HTML standard is not flexible enough for lots of applications. Much likedatalist
doesn't cut it for many Combobox scenarios andselect
doesn't cut it for many Listbox scenarios,<input type="date" />
doesn't cut it for many DateInput scenarios.Further, a good custom DateInput has a lot of logic to make it behave just right. This makes DateInput an ideal candidate for HeadlessUI treatment.
I propose a new HeadlessUI component called DateInput. It would behave similar to the Native date input in Safari and Chrome, in that, as the types, the cursor would be selecting different parts of the input to guide the user through typing a date.
I am already working on a Headless implementation of this and would be happy to create an initial PR if this idea is accepted
Beta Was this translation helpful? Give feedback.
All reactions