Skip to content

Browse components

← All components

Calendar Year Picker

Year grid for jumping to a different year.

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

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

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

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/calendar-year-picker.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/calendar-year-picker.

Import
import { CalendarYearPicker } from "@/components/ui/calendar-year-picker"
example.tsx
import { CalendarYearPicker } from "@/components/ui/calendar-year-picker"export function Example() {  return <CalendarYearPicker defaultValue={2026} />}

API Reference

CalendarYearPicker

PropTypeDefault
valuenumber—
defaultValuenumber—
onValueChange(year: number) => void—
startYearnumber—
endYearnumber—
  • startYear — Defaults to selected year − 6.
  • endYear — Defaults to selected year + 5.