finds.dev← search

// the find

bevacqua/rome

★ 2,899 · JavaScript · MIT · updated Mar 2024

:calendar: Customizable date (and time) picker. Opt-in UI, no jQuery!

Rome is a vanilla JS date/time picker from 2014 that attaches to input elements or renders inline. It wraps moment.js with a clean event-driven API and lets you control every CSS class name. Aimed at projects that want a lightweight picker without pulling in jQuery.

The CSS class override system is genuinely well thought out — every single element has a configurable class name, so you can adapt it to any design system without fighting specificity wars. The validator API (`rome.val.except`, `rome.val.only`) handles date ranges and arrays of excluded dates, which covers most real-world booking UI needs. Inline and input-attached modes share the same API, so you're not learning two different things. The `destroy`/`restore` cycle is explicit and does actually clean up event listeners.

It's hard-coupled to moment.js, which is itself effectively retired — you can swap the instance via `rome.use()` but the whole internal API is built around moment objects, so you can't use day.js or date-fns without rewriting the guts. The repo has been essentially unmaintained since 2017 with only a stray commit in 2024; the open issues contain valid bugs with no responses. The time picker is a dropdown with fixed intervals rather than a clock or free-text input, which fails usability for anything needing precise time entry. No TypeScript types exist, so you're flying blind in any typed project.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →