Getting Started
Small date picker examples built with @pglejzer/datepicker-ui, the companion of timepicker-ui.
Default picker
#Pass a selector and call create(). A bare <input> is wrapped in a div.dp-ui host. With no options the picker selects a single date and opens as a docked popover, or as a modal on small windows.
Start with a value
#calendar.defaultValue sets the starting value of an empty input, in the same shape as setValue(). Any date can be "today", which the browser resolves when create() runs. Text already in the input wins, and a form reset restores the value.
Read the confirmed value
#callbacks.onConfirm receives { value, autoCommit }. In single mode value.value is the ISO date YYYY-MM-DD, whatever format the input shows. value is null when the field was cleared.
Docs: Quick Start · Events · Options