Skip to content

Date time picker ​

hx-date-time-picker is a date and time field that opens a calendar with a time row under it (hour, minute, optionally second and AM/PM), or with [inline]="true" the calendar and the time row alone. The value is one Date (HxDateTimePickerValue, Date | null); clearing the field gives null. It works with ngModel, reactive forms (including disable()) and signal forms ([formField]).

html
<hx-date-time-picker inputId="start" showIcon showButtonBar [stepMinute]="15" [(ngModel)]="start" />
<hx-date-time-picker hourFormat="12" [minDate]="opening" [maxDate]="closing" [(value)]="visit" />
<hx-date-time-picker inline ariaLabel="Start" [(value)]="start" />
InputTypeDefaultDescription
minDate, maxDateDateEarliest and latest moment, compared including the time (new Date(2026, 9, 28, 17, 0) closes a day at 17:00). A time outside moves to the nearest limit.
disabledDatesDate[][]Days that cannot be chosen.
firstDayOfWeeknumber00 Sunday … 6 Saturday.
hourFormat'24' | '12''24''12' shows hours from 1 to 12 and an AM/PM column.
showMinutesbooleantruefalse picks the hour only: no minute and second column, minutes and seconds are 0.
showSecondsbooleanfalseA seconds column (ignored without showMinutes).
stepHour, stepMinute, stepSecondnumber1Step of the arrow keys and buttons of a column.
placeholder, inputIdstringOf the text field.
showIconbooleanfalseA calendar button at the end of the field.
showButtonBarbooleanfalseToday and Clear buttons under the time row of the popup.
inlinebooleanfalseShows the calendar and the time row in the page, with no field.
dateFormatIntl.DateTimeFormatOptionsnumeric dd/mm/yyyy, hh:mm in the order of the localeFormat of the text in the field.
localestringthe browser'sA BCP 47 tag for the names and the format.
timeLabel, hourLabel, minuteLabel, secondLabel, periodLabelstringTime, Hour, Minute, Second, AM/PMAccessible names of the row and the columns.
todayLabel, clearLabel, chooseLabelstringToday, Clear, Choose date and timeText of the button bar; name of the button and the popup.
disabled, invalidbooleanfalse
ariaLabel, ariaLabelledbystringName of the field (or of the inline control) and the popup.
  • Field: it shows the value with Intl.DateTimeFormat (10/09/2026, 14:05). Typing parses the date in the order of the locale (also yyyy-mm-dd) and the time (14:30, 03:45 PM or 3:45 pm); with [showMinutes]="false" the time is the hour (14, 14:00 or 2 PM). Enter or leaving the field commits it; an unreadable, disabled or out of range date and time puts the value back.
  • Value: choosing a day keeps the time already set; setting a time with no date takes today. Time zones are not handled: the value is a local Date. Setting a time with no date does nothing when today is in disabledDates or outside minDate..maxDate.
  • Popup: click, the button, Arrow Down or Alt+Arrow Up open it; it is a non-modal dialog that stays open until Escape, the focus leaving the control or a button of the button bar (Today, Clear). Focus moves to the selected or today's day and returns to the field on close.
  • Keyboard: in the day grid the arrows move by a day or a week, Home and End to the start and end of the week, Page Up and Page Down by a month (with Shift by a year), Enter or Space selects. The grid is one tab stop.
  • Accessibility: each time column is a role="spinbutton" (aria-valuenow, aria-valuetext): Arrow Up and Down change it by the step, Page Up and Page Down by a larger step, Home and End go to the first and last value. The arrow buttons are not in the tab order.

Tokens ​

The look comes from the design tokens --h-datepicker-* and --h-inputtext-* (see Theming); override them in your theme, never the component CSS.

Part of @gravionlabs/helix-ui; all components are listed in the component reference.

Released under the MIT licence.