Import

import-calendar.ts
import { NuiCalendar, type NuiDateRange } from '@needless-ui/angular/calendar';

NuiCalendar

A calendar for choosing days.

Selector
nui-calendar
NuiCalendar: Properties
NameTypeDefaultDescription
selectionInput'single' | 'range' | 'multiple''single'How many days can be chosen.
valueTwo-wayNuiDate | nullnullThe chosen day.
valuesTwo-wayNuiDate[][]The chosen days, in order.
rangeTwo-wayNuiDateRange | nullnullThe chosen range, both ends included.
monthTwo-wayNuiMonth | nullnullThe month shown, the first when several are.
viewTwo-way'day' | 'month' | 'year''day'Days, months or years.
min, maxInputNuiDate | nullThe first and last days that can be chosen.
unavailableInput(date: NuiDate) => booleanRules out other days, such as holidays.
monthsInputnumber1Months side by side.
weekNumbersInputbooleanfalseShows ISO week numbers.
firstDayInput1 … 7The first day of the week, 1 for Monday. By default, the locale’s.
localeInputstringLOCALE_IDFormats names and digits, and picks the first day of the week.
labelsInputPartial<NuiCalendarLabels>Every text the calendar shows or announces, to translate.
cornersInputNuiCornersThe shape of its corners: round, squircle, bevel, scoop, notch or square.
radiusInputNuiRadiusHow big its corners are: none, small, medium, large or full.
densityInputNuiDensityHow much room it takes: compact, regular or roomy.
pickedOutputNuiDate | NuiDateRangeEmits each choice: a day, or a range once complete.
focusDateMethod(date?: NuiDate) => voidMoves the keyboard to a day, showing its month.

Customization inputs you leave unset follow the nearest data-nui-* attribute. See the customization guide.

NuiDateRange

A range of days.

NuiDateRange: Properties
NameTypeDefaultDescription
start, endPropertyNuiDateThe first and last days, both included.