shadcn

Calendar with day button

Buttons 21

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

    813
  • Calendar with time pressets

    Calendar with time pressets

    531
  • Sidebar

    Sidebar

    365
  • Sonner

    Sonner

    255
  • Chart

    Chart

    231
  • Icons

    Icons

    212
  • Dropdown Menu

    Dropdown Menu

    163
  • Calendar with event slots

    Calendar with event slots

    130

More in Buttons

View all
  • Button

    Button

    20
  • Button

    Button

    3
  • Button Group

    Button Group

    18
  • Button

    Button

    149
  • Icon Label Subtext Button

    Icon Label Subtext Button

    69
  • Button

    Button

    9
  • Button

    Button

    37
  • Texture Button

    Texture Button

    113