haassiib

Month Picker

Forms

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>
  );
}

Dependencies

More by haassiib

View all
  • Tabs

    Tabs

    18
  • Bar Chart

    Bar Chart

    7
  • Month Range Picker

    Month Range Picker

    6
  • Checkbox

    Checkbox

    2
  • Condition Groups Builder

    Condition Groups Builder

    1
  • Resizable Drawer

    Resizable Drawer

  • Account Cell

    Account Cell

  • Split Button

    Split Button

More in Forms

View all
  • Premium Auth

    Premium Auth

    577
  • Login 1

    Login 1

    68
  • Contact Card

    Contact Card

    1.1K
  • Form

    Form

    18
  • Login Card

    Login Card

    36
  • Login 2

    Login 2

    15
  • Change Password Form

    Change Password Form

    11
  • Form

    Form

    3