Datetime picker

Pick a date and time together.

Custom placeholder

Min / max

With seconds

Dropdown caption

Range

Range with limits

API reference

Inputs

PropTypeDefaultDescription
modeCalendarMode'single'`single` (default) or `range`.
monthsnumber1Month grids shown in the popover (handy for range).
placeholderstringText shown on the trigger when nothing is selected. Falls back to `provideBuiLabels`.
timeLabelstringLabel for the time field in the popover. Falls back to `provideBuiLabels`.
minDatestring''Earliest selectable date (`yyyy-mm-dd`).
maxDatestring''Latest selectable date (`yyyy-mm-dd`).
captionLayout"dropdown" | "label"'label'`dropdown` swaps the month label for month + year selects.
secondsbooleanfalseWhether to include seconds in the time field.
timeModeTimeFieldMode'input'How the popover's time field renders. The default native `input` is drawn by the browser in *its* language, so it can disagree with a trigger formatted in `locale`; `select` follows `locale` instead and keeps the whole picker on one clock.
localestringBCP 47 locale for the trigger text and the calendar. Defaults to the app's `LOCALE_ID`.
dateFormatIntl.DateTimeFormatOptionsDEFAULT_DATE_FORMAT`Intl.DateTimeFormat` options for the trigger text. Replaces the default wholesale, so `{ dateStyle: 'short', timeStyle: 'short' }` is valid (options cannot be mixed with it).

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
valuestring''Selected date-time (mode="single") as `YYYY-MM-DDTHH:mm`. Two-way bindable with `[(value)]`.
rangeCalendarRange{ start: '', end: '' }Selected range when mode="range" — start/end as `YYYY-MM-DDTHH:mm`, sharing one time.
disabledbooleanfalseWhether the picker is disabled. Two-way bindable with `[(disabled)]`.

Types

CalendarMode — Selection behavior of the calendar.

"multiple" | "range" | "single"

CalendarRange

FieldTypeDescription
startstringStart date of the range, as `yyyy-mm-dd`.
endstringEnd date of the range, as `yyyy-mm-dd`.

TimeFieldMode — How the time field renders: native input or hour/minute selects.

"input" | "select"

Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.