Date picker · calendar select

A date field that opens a calendar — presets for the usual picks, a range across two months with a live preview, limits and blocked days, any locale, and the keyboard all the way.

One day · presets · today · clear

A range over two months · presets

Hover shows the span before the second click.

Limits · locales · sizes

Value: none · Enter or ↓ on a field opens it; the arrow keys walk the days; Esc closes.

Usage

JavaScript
import { signal } from "./index.js";import { DatePicker } from "./components/datepicker.js"; const date = signal(null);   // Signal<Date | null>DatePicker({ value: date, placeholder: "Pick a date…", clearable: true, todayButton: true })DatePicker({ value: date, presets: true })                  // Today · Tomorrow · In a week // a range — two months side by side, presets (Last 7 days, This month…)const from = signal(null), to = signal(null);DatePicker({ range: true, start: from, end: to, numberOfMonths: 2, presets: true,             onRange: (a, b) => load(a, b) }) // limits, days that can't be picked, any localeDatePicker({ value: date, min: today, max: in60days, disabledDates: (d) => d.getDay() % 6 === 0 })DatePicker({ value: date, locale: "tr" })                    // or "de", "ja"… via Intl