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

    782
  • Calendar with time pressets

    Calendar with time pressets

    515
  • Sidebar

    Sidebar

    348
  • Sonner

    Sonner

    236
  • Chart

    Chart

    220
  • Icons

    Icons

    191
  • Dropdown Menu

    Dropdown Menu

    154
  • Calendar with event slots

    Calendar with event slots

    119

More in Buttons

View all
  • Texture Button

    Texture Button

    98
  • Button

    Button

    1
  • Button

    Button

    68
  • Eclipse Button

    Eclipse Button

    3
  • Button

    Button

    65
  • App Store Button

    App Store Button

    458
  • Base Button

    Base Button

    4
  • HeroUI Button Group

    HeroUI Button Group

    2