Calendar
Select a date from a month view.
Examples
Select a date from a month view
React code
import { Calendar } from "@accelerate/react/components";
export function Example() {
return (
<>
<Calendar data-value="2026-12-05" data-min="2026-12-01" data-max="2027-01-31" data-week-starts-on="1"></Calendar>
</>
);
}Angular code
import { Component } from "@angular/core";
import { AccCalendar } from "@accelerate/angular/components";
@Component({
selector: "app-example",
imports: [
AccCalendar,
],
template: `
<div accCalendar data-value="2026-12-05" data-min="2026-12-01" data-max="2027-01-31" data-week-starts-on="1"></div>
`,
})
export class Example {}Installation
Source preview. The expanded component catalog is ahead of the public npm releases. To run these examples in your own application, use packages built from the SDK source used for the previews or a release that includes the APIs below.
- React
@accelerate/ui@0.4.0and@accelerate/react@0.4.0- Angular
@accelerate/ui@0.4.0and@accelerate/angular@0.2.0
Load @accelerate/ui/theme.css and put acc-theme on the app or the region using Accelerator components. See the framework setup guide for the theme and adapter conventions.
Usage
Use an empty host. Set initial data-value, data-min, and data-max as ISO dates and optional data-week-starts-on from 0 (Sunday) to 6. Locale comes from the nearest lang. Selection is reported as an ISO date.
Import the React component Calendar from @accelerate/react/components. For Angular, add AccCalendar to the standalone component’s imports and use <div accCalendar>.
Examples use these React parts: Calendar. The Angular examples show the corresponding directives and template hosts.
API reference
- data-value / data-min / data-max
- ISO dates in YYYY-MM-DD format.
- data-week-starts-on
- 0 for Sunday through 6 for Saturday.
- valueChange
- Reports the selected ISO date.