Skip to content

DatePicker

<ax-date-picker> pairs a text field with a connected-overlay Calendar. It parses free-typed dates against a format and supports the same single/range/multiple modes. It’s a Pro component and self-gates with a PRO watermark until licensed.

import { AxDatePickerComponent, type CalendarMode, type CalendarValue } from '@axisui-ng/forms';
<ax-date-picker [(value)]="date" format="yyyy-MM-dd" placeholder="Pick a date" />
<!-- range -->
<ax-date-picker [(value)]="range" mode="range" rangeSeparator=" to " />
InputTypeDefaultNotes
valuemodel<CalendarValue>nullSame shape as Calendar: Date, DateRange, or Date[].
modeCalendarMode ('single' | 'range' | 'multiple')'single'Selection behaviour.
minDate | nullnullInclusive lower bound (passed to the overlay calendar).
maxDate | nullnullInclusive upper bound.
disabledDates((d: Date) => boolean) | nullnullExtra per-day disable predicate.
weekStartsOnWeekDay (0–6)0First weekday for the overlay calendar.
localestring | undefinedundefinedLocale for calendar month/day names.
formatstring'yyyy-MM-dd'Display + parse pattern.
placeholderstring''Field placeholder.
ariaLabelstring'Date'Accessible label for the text input.
rangeSeparatorstring' – 'Separator between range ends in the field.

The control is a labelled text <input> plus a “Toggle calendar” button. Focus or click opens the connected calendar overlay; blur / Enter commits free-text parsing (invalid text sets aria-invalid); Escape or an outside pointer closes the overlay. The embedded calendar keeps its grid keyboard semantics.

Pro component — see ProWatermark for how the watermark/gating works.

Interactive examples live in Storybook under Pro / DatePicker. Run pnpm storybook to explore them.