timepicker-ui
4.6.0GitHub
timepicker-ui
Advanced / Date and Time

Date and Time Picker

Pair a date field with a time field from timepicker-ui. This page documents @pglejzer/datepicker-ui, the companion of timepicker-ui.

One theme for both

#

The two libraries are separate and do not depend on each other. Both accept the same ten theme names in ui.theme, so one value styles the date and the time field alike. Use the select to switch both at once.

Date and time

Combined: nothing selected

import DatepickerUI from "@pglejzer/datepicker-ui";
import { TimepickerUI } from "timepicker-ui";
import "@pglejzer/datepicker-ui/index.css";
import "timepicker-ui/index.css";
const theme = "crane";
new DatepickerUI("#date", { ui: { theme } }).create();
new TimepickerUI("#time", { ui: { theme } }).create();

Note

Import timepicker-ui/index.css next to @pglejzer/datepicker-ui/index.css. Each library styles its own picker. The time field has two more themes of its own, dark and blueprint-dark.
Esc