# Calendar Year Picker

> Year grid for jumping to a different year.

Registry name: `calendar-year-picker`. HTML docs: https://ui.anuragroy.dev/component/calendar-year-picker.

## Install

```bash
npx shadcn@latest add https://ui.anuragroy.dev/r/calendar-year-picker.json
```

If the website is down: `npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/calendar-year-picker.json`.

Registry JSON: https://ui.anuragroy.dev/r/calendar-year-picker.json (GitHub: https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/calendar-year-picker.json).

## Import

Import paths follow the consumer `components.json` aliases. After a default install:

```tsx
import { CalendarYearPicker } from "@/components/ui/calendar-year-picker"
```

## Usage

```tsx
import { CalendarYearPicker } from "@/components/ui/calendar-year-picker"

export function Example() {
  return <CalendarYearPicker defaultValue={2026} />
}
```

## API

### CalendarYearPicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | number | — |  |
| `defaultValue` | number | — |  |
| `onValueChange` | (year: number) => void | — |  |
| `startYear` | number | — | Defaults to selected year − 6. |
| `endYear` | number | — | Defaults to selected year + 5. |

## See also

- [HTML page](https://ui.anuragroy.dev/component/calendar-year-picker): Preview and the same docs in the site chrome.
- [Registry item](https://ui.anuragroy.dev/r/calendar-year-picker.json): Source files and dependencies.
- [Catalog](https://ui.anuragroy.dev/component): All components.
- [llms.txt](https://ui.anuragroy.dev/llms.txt): Agent index for this library.
