MonthPicker

Interactive grid for selecting a month within a given year. Renders a responsive layout that adapts to screen width and respects locale formatting as well as min/max date constraints.

npm install @plocks/dates

Basics

Interactive grid for selecting a month within a given year. Renders a responsive layout that adapts to screen width and respects locale formatting as well as min/max date constraints.

Loading demo…

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