shadcn

Calendar with day button

Buttons 19

About

Here is shadcn calendar component with today button

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Calendar with day button to your project and fits it to your theme.

Code

How Calendar with day button is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client"

import * as React from "react"

import { Button } from "@/components/ui/button"
import { Calendar } from "@/components/ui/calendar"
import {
  Card,
  CardAction,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card-shadcn"

export function Calendar10() {
  const [date, setDate] = React.useState<Date | undefined>(
    new Date(2025, 5, 12)
  )
  const [month, setMonth] = React.useState<Date | undefined>(new Date())

  return (
    <Card>
      <CardHeader>
        <CardTitle>Appointment</CardTitle>
        <CardDescription>Find a date</CardDescription>
        <CardAction>
          <Button
            size="sm"
            variant="outline"
            onClick={() => {
              setMonth(new Date())
              setDate(new Date())
            }}
          >
            Today
          </Button>
        </CardAction>
      </CardHeader>
      <CardContent>
        <Calendar
          mode="single"
          month={month}
          onMonthChange={setMonth}
          selected={date}
          onSelect={setDate}
          className="bg-transparent p-0"
        />
      </CardContent>
    </Card>
  )
}

More by shadcn

View all
  • Navigation menu

    Navigation menu

    771
  • Calendar with time pressets

    Calendar with time pressets

    504
  • Sidebar

    Sidebar

    339
  • Sonner

    Sonner

    231
  • Chart

    Chart

    215
  • Icons

    Icons

    178
  • Dropdown Menu

    Dropdown Menu

    149
  • Calendar with event slots

    Calendar with event slots

    116

More in Buttons

View all
  • Button

    Button

    14
  • Texture Button

    Texture Button

    92
  • Button

    Button

    34
  • Button Save

    Button Save

    46
  • Button

    Button

    64
  • Button Group

    Button Group

    3
  • Notification Button

    Notification Button

    103
  • Button

    Button