YearPicker

Grid-based selector for choosing a year within a configurable range. Supports responsive layouts, decade navigation, and min/max constraints for simplified year selection flows.

npm install @plocks/dates

Basics

Grid-based selector for choosing a year within a configurable range. Supports responsive layouts, decade navigation, and min/max constraints for simplified year selection flows.

Loading demo…

import React, { useState } from 'react'; import { Block, Text } from '@plocks/ui'; import { YearPicker } from '@plocks/dates'; export function Demo() { const [value, setValue] = useState<Date | null>(new Date()); return ( <Block fullWidth> <YearPicker value={value} onChange={setValue} totalYears={20} /> <Text size="sm" c="secondary"> {value ? `Selected: ${value.getFullYear()}` : 'No year selected'} </Text> </Block> ); }
Scan to open this page on your phoneplocks.dev/dates/YearPicker