Date Field

A date typed part by part in the reader's order, with arrow keys, paste, min and max, and an error that says what's wrong.

Nov 1 to today. October is closed.

Net 30 by default.

INV-2041 · $4,280.00 · due December 28, 2026

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/date-field

Usage

import { DateField } from "./ui/uicontext/components/DateField.ts"
const Message = UiSchema.TaggedEnum({ CommittedBirthday: { value: Schema.NullOr(Schema.String) } })export const Birthday = (h: Html.H<typeof Message.Type>, birthday: string | null) =>	DateField(h, {		props: { label: "Birthday", value: birthday, max: "2026-12-02" },		onEmit: { Committed: ({ value }) => Message.CommittedBirthday({ value }), RequestedOpen: () => undefined },	})

Examples

Locales and right to left

Month first in the US, day first in the UK and Germany, with a dot in German. Type in one and the others follow.

Source