Date Picker
Calendar primitives for date and range selection.
Usage
Usage notes
The calendar is a single tab stop: the arrow keys move by day and week, Home and End jump to the first and last day of the month, Page Up and Page Down change month, and Enter or Space selects. volt-date-pickeris a form control: aformControlorngModelwrite is silent, one selection emits one change, and the control is marked touched only when focus leaves the calendar.Days outside minandmaxor rejected bydateDisabledare announced as unavailable and cannot be picked;disabledblocks the whole calendar.
API Reference
VoltDatePickerCell — volt-date-picker-cell
| Input | Type | Default |
|---|---|---|
| class | string | '' |
VoltDatePickerDateButton — volt-date-picker-date-button
| Input | Type | Default |
|---|---|---|
| class | string | '' |
| aria-label | string | undefined | undefined |
VoltDatePickerGrid — volt-date-picker-grid
| Input | Type | Default |
|---|---|---|
| class | string | '' |
VoltDatePickerLabel — volt-date-picker-label
| Input | Type | Default |
|---|---|---|
| class | string | '' |
| id | string | — |
| aria-live | string | 'polite' |
VoltDatePickerNextMonth — volt-date-picker-next-month
| Input | Type | Default |
|---|---|---|
| class | string | '' |
VoltDatePickerPreviousMonth — volt-date-picker-previous-month
| Input | Type | Default |
|---|---|---|
| class | string | '' |
VoltDatePicker — volt-date-picker
| Input | Type | Default |
|---|---|---|
| class | string | '' |
| min | Date | — |
| max | Date | — |
| disabled | boolean | false |
| dateDisabled | (date: Date) => boolean | () => false |
| firstDayOfWeek | VoltDatePickerFirstDayOfWeek | 7 |
| date | Date | undefined | — |
| focusedDate | Date | undefined | — |
| Output | Type |
|---|---|
| dateChange | Date | undefined |
| focusedDateChange | Date | undefined |
VoltDateRangePicker — volt-date-range-picker
| Input | Type | Default |
|---|---|---|
| class | string | '' |
| min | Date | — |
| max | Date | — |
| disabled | boolean | false |
| dateDisabled | (date: Date) => boolean | () => false |
| firstDayOfWeek | VoltDatePickerFirstDayOfWeek | 7 |
| startDate | Date | undefined | — |
| endDate | Date | undefined | — |
| focusedDate | Date | undefined | — |
| Output | Type |
|---|---|
| startDateChange | Date | undefined |
| endDateChange | Date | undefined |
| focusedDateChange | Date | undefined |
Component Source
Install via CLI:
npx @voltui/cli add date-pickerTypeScript
Loading editor…
Copy this code to your project. The component uses ng-primitives/date-picker.