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

    777
  • Calendar with time pressets

    Calendar with time pressets

    507
  • Sidebar

    Sidebar

    344
  • Sonner

    Sonner

    235
  • Chart

    Chart

    220
  • Icons

    Icons

    186
  • Dropdown Menu

    Dropdown Menu

    151
  • Calendar with event slots

    Calendar with event slots

    117

More in Buttons

View all
  • Texture Button

    Texture Button

    95
  • Eclipse Button

    Eclipse Button

    6
  • App Store Button

    App Store Button

    457
  • Button Group

    Button Group

  • Button

    Button

    14
  • Button

    Button

    32
  • Button

    Button

    65
  • HeroUI Button Group

    HeroUI Button Group

    9