DatePicker

A date field with a calendar — one date, several dates or a range, with time, typed or picked, as a popup, a touch dialog or inline. Works with reactive forms, ngModel and signal forms.

Features20APIThemingAccessibility

Basic

Click or focus the field to open the calendar, or type a date. The value is a Date.

Value: —

Format

dateFormat shows and parses the date: dd / mm / yy, month and weekday names M / MM / D / DD, quoted literals. Without it the locale decides (mm/dd/yy in English, dd.mm.yy in Ukrainian), and so does the first day of the week.

Icon

showIcon adds a calendar button joined to the field (iconDisplay="button") or an icon inside it (input); icon or a template changes it. showClear adds a clear button while there is a value.

Range

selectionMode="range": the first click sets the start, the second the end; a click before the start starts again. While the end is not picked, the days up to the hovered (or keyboard-focused) day are highlighted, also across months. The value is [start, end].

Pick the first day.

Multiple

selectionMode="multiple" collects dates — a second click removes one; maxDateCount sets the limit.

0 of 5 picked

Limits

minDate / maxDate limit the range, disabledDays blocks weekdays (here weekends) and disabledDates single days. Typed dates outside the limits are not accepted.

Month year

view="month" picks a month and view="year" a year. In the date view the month and year in the header open the same grids.

Time

showTime adds hours and minutes (hold a button to spin), hourFormat="12" adds AM / PM, stepMinute / stepHour / stepSecond set the step, showSeconds adds seconds and timeOnly leaves only the time.

Months

numberOfMonths shows months side by side; responsiveOptions shows fewer on narrow screens.

Week

showWeek adds ISO week numbers. Days of the neighbour months can be picked; selectOtherMonths="false" only shows them and showOtherMonths="false" hides them.

Button bar

showButtonBar adds Today and Clear under the calendar; a txDatePickerButtonBar template replaces them.

Inline

inline puts the calendar in the page instead of a popup.

Wk Su Mo Tu We Th Fr Sa
45 1 2 3 4 5 6 7
46 8 9 10 11 12 13 14
47 15 16 17 18 19 20 21
48 22 23 24 25 26 27 28
49 29 30 1 2 3 4 5
Pick a day

Touch

touchUI opens the calendar as a centred dialog over a mask — comfortable on phones; with readonlyInput the on-screen keyboard stays closed.

Date template

A txDatePickerDate template draws each day; it gets the day with today, otherMonth and selectable.

Forms

A form control: tx-field links the label, hint and error, the field turns invalid with the control, and disabling the control disables the picker.

dd.mm.yy, today or later

Float label

Works inside tx-float-label and tx-ifta-label: the label moves while the field is focused, open or filled.

Sizes

size is small, medium or large, the same as every field; the icon button follows.

States

variant="filled", invalid, readonly and disabled look like every other field.

Design tokens

dt changes the tokens of one picker — here larger square days in the success colour.

Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5

Pass through

pt styles the parts — here a dashed header line and quieter weekday names.

Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5