Litopis GitHub

Examples

Each preview runs the TypeScript shown in its Code tab. Copy the matching HTML host and module into your app.

Picker examples use @litopis/dom and its base stylesheet. Date math examples also use @litopis/core. The headless example only needs core.

Popup date picker

Open the calendar from an input and keep it open after choosing a date.

Value: none

Basic inline picker

Choose a date and read its ISO value from the controller.

Select a date

Bounded booking window

Disable dates before or after the allowed booking window.

Value: none

Three input formats, one stored value

Choose a visible format. Each picker reports the same ISO representation.

ISO

No date selected

European

No date selected

US

No date selected

Locale labels and explicit week starts

Localize names with locale and override the first day of the week when needed.

Ukrainian locale

US locale, Monday override

Comfortable touch targets

Set calendar controls to at least 44px for comfortable touch input.

Value: none

Programmatic controller

Set the value, visible month or options on an existing picker.

Value: none

Headless calendar state

Move focus and select a date with @litopis/core, without generating calendar markup.

Range and native form values

Choose departure and return dates and read both ISO values from FormData.

Choose a start and end date

Month and year values

Pick a whole month or year. The returned ISO value starts at that period boundary.

Month

Select a month

Year

Select a year

Update unavailable dates

Replace an availability snapshot while the picker stays mounted.

Value: none