r/javascript • • Jul 10 '26

AskJS [AskJS] Looking for a solid vanilla JS datepicker. Am I completely out of options?

I'm looking for a datepicker for a vanilla JS project, and somehow this seems much harder than it should be.

No, input masks aren't enough.
No, the native <input type="date"> isn't enough either.

My checklist:

  • Accessible
  • Localized
  • Flexible formatting options
  • Range picker support
  • A decent set of events/hooks for integration

What I've looked at so far:

  • flatpickr: hasn't been updated in about 4 years
  • vanilla-js-datepicker: hasn't been updated in about 3 years, and the range functionality is pretty weak
  • Vanilla Calendar Pro: Russian-maintained, which is ruled out by our dependency policy
  • Air Datepicker: same issue, and it also hasn't been updated in about a year
  • Litepicker: dead
  • Easepick: dead

Most of the other options I've found are React-based, which is a non-starter for this project.

Am I missing something, or are there really no good options left?

0 Upvotes

47 comments sorted by

View all comments

Show parent comment

5

u/Admirable_Reality281 Jul 10 '26

I'm not pissed. Temporal being Stage 4 doesn't make it a datepicker UI or magically cover accessibility, keyboard navigation, range selection, and calendar rendering. Also, standardized and Baseline are not the same thing.

-6

u/KaiAusBerlin Jul 10 '26

I know exactly you never worked in a modern team.

Okay, I'll go slow just for you.

What is a date picker UI about? About dates, right. Why would you pick a date when not working with it, right? How do you want it to be represented in code? Custom, standard (with several quirks, edge cases and strange behaviour) or standard without quirks and full international support?

Yeah, the last one. Right.

Due to the official polyfill it's already used in production. Because it's simply the better way to deal with dates in js. If you want to work safe and efficient with original Date objects you need a library for that (or end up writing your own).

So to the final question: Why should a date picker stick to modern standards and implement the temporal api?

Because it will make the library smaller, safer and faster and will make it much easier for professionals to include it and work with it.

4

u/Admirable_Reality281 Jul 10 '26

You’re still arguing against a point I never made. Temporal handles dates, it does not replace a datepicker UI. Repeating yourself more condescendingly doesn’t change that.

-3

u/KaiAusBerlin Jul 10 '26

You don't understand what a datepicker ui is for right?

Why would you pick a date?

Right! To work with it in the code. You do it so the user has a comfortable way to give your code the dates you need to work with.

If that is an outdated quirky format like Date it's harder to work with it.

Oh, now I get it. You just use it to fill a input tag 😆

You really need an external UI for that?

3

u/Admirable_Reality281 Jul 10 '26

At this point you’re not misunderstanding me, you’re misunderstanding basic separation of concerns. I'm done.

-3

u/KaiAusBerlin Jul 10 '26

Lol.

Now I know you're absolutely nonprofessional.

4

u/binaryhero Jul 10 '26

Nein, Du bist einfach taub. Er sucht ein Datepicker UI-Element. Wie das Datum da repräsentiert wird, hat er nicht erwähnt. Das ist der Punkt, über den Du Dich hier erregst...

3

u/Admirable_Reality281 Jul 10 '26

Thank you 🫶🏻

0

u/KaiAusBerlin Jul 11 '26

Er hat eine Frage gestellt. Warum sollte man eine library updaten. Ich habe ihm eine legitime Antwort darauf gegeben. Das er eine snowflake ist, die keine korrekte Kritik verträgt, ist nicht mein Problem.

Ich denke auch eher, dass du sein Zweitaccount bist, da ich ihn blockiert habe und sich absolut niemand für seinen Thread interessiert. Die Vorstellung dass jemand bis unten durch geht und exakt die selbe (falsche) Formulierung wie er in schlechtem Deutsch nutzt ist eher unwahrscheinlich ;)