Hacker News new | ask | show | jobs
by pzmarzly 577 days ago
The jQuery UI Datepicker widget[0] still remains my favourite date picker implementation, even though it sadly never supported mobile phones that well.

Non-confusing design, live-reacting to user typing the date with keyboard, accessible, configurable, and offering 0-effort localisation in 60+ languages[1].

Is there anything like this in React world?

[0] https://jqueryui.com/datepicker/#dropdown-month-year

[1] https://github.com/jquery/jquery-ui/tree/main/ui/i18n

2 comments

That date picker is really good.

> Is there anything like this in React world?

None in any world, to be honest.

It's amazing that most UI libraries go out of their way to make month and year selection as awkward and non-intuitive as possible.

It's as if today's UI designers can't imagine why someone would pick a date 20 years in the past.

I wonder if they ever had to enter their own date of birth on a form somewhere. Surely most of them are over 20 years old?

My guess is they've never built a birthday input, and possibly never had to use one.

Or rather their LLM has never.

Current top comment links to PrimeVue and I feel like it solves month/year selection very similarly (except not with a dropdown): https://primevue.org/datepicker/

This is the first UI component lib I checked. I'm curious what's missing here in your opinion?

It's not obvious you can click month/year. Unclear how to back out if you think you made a mistake.

One of the better ones I've seen is https://vaadin.com/docs/latest/components/date-picker

Fair! Thanks

EDIT: ooh wow that Vaadin one is super nice indeed!

Unless you require something special, just a regular <input type="date"> or datetime-local is a good choice these days. There's week and time types as well.
It’s amazing how far you can get with just HTML and a gentle sprinkle of CSS these days.