About
A dropdown form field for picking a single calendar month (stored as a YYYY-MM string), with a year-browsable month grid, an optional clear action, and a hook for disabling specific months like future ones.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Month Picker to your project and fits it to your theme.
Code
How Month Picker is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import MonthPicker from "@/components/ui/month-picker";
import { useState } from "react";
export default function MonthPickerDemo() {
const [value, setValue] = useState<string | null>("2026-08");
return (
<div className="flex min-h-[420px] w-full items-start justify-center bg-background p-10 text-foreground">
<div className="w-72">
<MonthPicker value={value} onChange={setValue} allowClear />
<pre className="mt-2 overflow-x-auto rounded-md bg-muted px-2 py-1 font-mono text-[10px] text-muted-foreground">
{JSON.stringify(value)}
</pre>
</div>
</div>
);
}
















