Litopis GitHub

Examples

Copy a setup, then adjust its options for your form.

Basic inline picker

Inline calendar with an initial value and an ISO form value.

Value: select a date

Popover date input

Keep the calendar out of document flow while preserving input typing, focus restoration and arrow-key entry into the grid.

Value: none

Bounded booking window

Dates outside the allowed range are disabled by the shared state layer and exposed consistently to every renderer.

Value: none

Three input formats, one stored value

Choose the visible format. getISOValue() returns YYYY-MM-DD in every case.

Locale labels and explicit week starts

Native Intl supplies month, weekday and ARIA labels. Week start can follow locale data or be overridden independently.

Ukrainian locale

US locale, Monday override

Comfortable touch targets

Sets day and control targets to 44px.

Value: none

Programmatic controller

Set the value, visible month or options from application code.

Value: none

Headless calendar state

Use the DOM-free package for custom renderers, server validation or tests. This state inspector calls @litopis/core directly and generates no calendar markup.