Calendar

Displays a calendar.
December 2024
SuMoTuWeThFrSa
Example
Source Code
Installation
"use client";

import React from "react";
import { Calendar } from "@/subframe/components/Calendar";

function CalendarExample() {
  return (
    <Calendar
      mode={"single"}
      selected={new Date()}
      onSelect={(date: Date | undefined) => {}}
    />
  );
}

export default CalendarExample;

Props

Calendar
Prop
Type
Default
Additional info
mode
"single" | "multiple" | "range" | "default"
The selection mode of the calendar.
selected
Date | undefined
The selected date.
onSelect
(date: Date | undefined) => void
Handler called when a date is selected.

Examples

Basic

Date Button