npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hwangti/vanillajs-datetimepicker

v2.0.0-beta.4

Published

Fork of vanillajs-datepicker that adds a 24-hour time picker (pickTime, minuteStep), switches format tokens to the Java/Moment convention, and ships TypeScript types.

Readme

vanillajs-datetimepicker

A fork of vanillajs-datepicker that adds time-picker support (pickTime, minuteStep) and switches the format-token convention to the Java/Moment style. Written from scratch as ECMAScript modules / Sass stylesheets, with pre-built JS/CSS for direct browser use.

It can work either standalone or with a CSS framework (e.g. Bootstrap, Foundation), and works best with Bulma — for which it was originally developed.

What's different from vanillajs-datepicker

  • Time picker — opt-in via pickTime: true, with optional minuteStep. Renders 24-hour hour/minute controls (number input + range slider, with min/max scale captions toggleable via timeSliderScale and step dots on coarse-stepped sliders) below the calendar; selected dates retain their hour and minute. The controls respect the time portion of minDate/maxDate and appear only on the days view, and the today button becomes a "Now" button.
  • Java/Moment format tokens — M/MM are numeric month, MMM/MMMM are month name, m/mm are minute, H/HH are 24-hour hour. This is a breaking change vs. vanillajs-datepicker / bootstrap-datepicker. See the Migration Guide.
  • TypeScript types — .d.ts files are generated from JSDoc and shipped in the package; no extra @types/* install needed.
  • Misc fork tweaks — softened prev/next-month cell opacity ($dp-cell-prevnext-opacity Sass var), a couple of timepicker UX fixes, DateRangePicker.setDates(start, end, options) third argument forwarded to each datepicker.

Install

npm install @hwangti/vanillajs-datetimepicker

Usage

Date only (default)

import { Datepicker } from '@hwangti/vanillajs-datetimepicker';

const input = document.querySelector('#date');
new Datepicker(input, { format: 'yyyy-MM-dd' });

Date + time

import { Datepicker } from '@hwangti/vanillajs-datetimepicker';

new Datepicker(document.querySelector('#datetime'), {
  format: 'yyyy-MM-dd HH:mm',
  pickTime: true,
  minuteStep: 15,
});

Date range with time

import { DateRangePicker } from '@hwangti/vanillajs-datetimepicker';

const wrap = document.querySelector('#range');
new DateRangePicker(wrap, {
  format: 'yyyy-MM-dd HH:mm',
  pickTime: true,
  minuteStep: 5,
});

TypeScript

Type definitions are bundled. The option types are also reachable as a separate import if you need to type your own variables.

import { Datepicker } from '@hwangti/vanillajs-datetimepicker';
import type { DatepickerOptions } from '@hwangti/vanillajs-datetimepicker/types';

const opts: DatepickerOptions = {
  format: 'yyyy-MM-dd HH:mm',
  pickTime: true,
  minuteStep: 15,
};

Features

  • Date picker (input-dropdown, inline), date range picker
  • Time picker (24-hour) with configurable minute step
  • Keyboard operation (arrow-key navigation, in-place input editing)
  • i18n (locales, CSS-based text direction detection)
  • Easy CSS-framework adaptation via Sass entry points
  • Dependency-free
  • Modern-browser only — no IE / Edge Legacy
  • Lightweight — ~35 kB minified, ~11 kB gzipped

Demo

Documentation

The docs site (docsify) is in docs/. Key pages:

Credits

This package is a fork of vanillajs-datepicker by Hidenao Miyamoto, which itself reimagines bootstrap-datepicker. All upstream design and the bulk of the calendar implementation are theirs.

License