Month pickerforms
Year and month grid with min/max months and a field variant; values are YYYY-MM strings.
설치
pnpm
pnpm dlx shadcn@4.23.0 add @uikit/month-pickerDefault
month-picker-demo.tsx
"use client";
import * as React from "react";import { MonthPicker } from "@/components/ui/month-picker";
export default function MonthPickerDemo() { const [value, setValue] = React.useState<string | null>("2028-02"); return ( <div className="flex flex-col gap-2"> <MonthPicker aria-label="Billing month" name="billingMonth" value={value} onValueChange={setValue} min="2027-06" max="2029-03" /> <p className="text-sm text-muted-foreground">{value ?? "No month selected"}</p> </div> );}