Component
Calendar
An inline month grid for picking dates. It selects a single day, a range, or several days, honours min, max, and disabled dates, and offers presets, dropdown captions, multiple months, and a time picker.
Single
July 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Selected: Mon Jul 13 2026
import { ChangeDetectionStrategy, Component, computed, signal } from '@angular/core';
import { HbCalendarImports, type HbCalendarValue } from '@herbst/ui';
@Component({
selector: 'hb-demo-calendar-single',
imports: [HbCalendarImports],
template: `
<div class="flex flex-col gap-2">
<hb-calendar
[hbValue]="date()"
(hbValueChange)="date.set($event)"
class="w-fit rounded-lg border border-border"
/>
<p class="font-mono text-[12px] text-muted-foreground">Selected: {{ label() }}</p>
</div>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HbDemoCalendarSingleComponent {
protected readonly date = signal<HbCalendarValue>(new Date(2026, 6, 13));
protected readonly label = computed(() => {
const value = this.date();
return value instanceof Date ? value.toDateString() : '—';
});
}
Range & two months
July 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
August 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Multiple, min/max & disabled
July 2026
| Mo | Tu | We | Th | Fr | Sa | Su |
|---|---|---|---|---|---|---|
Presets, dropdowns & time
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Custom day cell
October 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Dots mark days with an autumn walk planned.
API reference
hb-calendar
| Property | Description | Type | Default |
|---|---|---|---|
| [(hbValue)] | Selected value: a Date, a { start, end } range, an array of Dates, or null. | HbCalendarValue | null |
| [hbMode] | Selection behaviour. | 'single' | 'range' | 'multiple' | 'single' |
| [hbDefaultDate] | Month shown first when there is no value. | Date | null | null |
| [hbMin] / [hbMax] | Earliest and latest selectable dates. | Date | null | null |
| [hbDisabledDates] | A list of dates or a predicate that disables days. | Date[] | ((date: Date) => boolean) | [] |
| [hbNumberOfMonths] | How many months to render side by side. | number | 1 |
| [hbWeekStartsOn] | First day of the week (0 = Sunday … 6 = Saturday). | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 |
| [hbCaption] | Header as a static label or month/year dropdowns. | 'label' | 'dropdowns' | 'label' |
| [hbPresets] | Quick presets: a label and a value (or a function returning one). | HbCalendarPreset[] | [] |
| [hbShowTime] | Add a time picker below the grid. | boolean | false |
| [hbLocale] | date-fns locale for month and weekday names. | Locale | null | null |
| [hbTimezone] | IANA timezone used to compute the current day. | string | null | null |
| [hbDisabled] | Disable the whole calendar. | boolean | false |
| ng-template[hbCalendarDay] | Replace the content of each day cell. Context: $implicit = date, plus selected, today, disabled, outside, and inRange. | template | — |