Components
Functional without any properties by default, rendering the current month with single date selection and a month-selection view. Supports controlled and uncontrolled values, range selection, rendering multiple months, individual selected and disabled dates, min/max boundaries, localization and a configurable first week day.
npx @21st-dev/cli add reshaped/reshaped-calendarLoading preview...
import { Reshaped, useResponsiveClientValue, View } from "reshaped/bundle";
import Calendar from "@/components/ui/reshaped-calendar";
function Component() {
const monthsToRender = useResponsiveClientValue({
s: 1,
l: 2,
});
return (
<View>
<Calendar
range
monthsToRender={monthsToRender}
defaultMonth={new Date(2023, 0)}
defaultValue={{
start: new Date(2023, 0, 10),
end: new Date(2023, 0, 14),
}}
/>
</View>
);
}
export default function Demo() {
return (
<Reshaped theme="slate">
<div style={{ maxWidth: 640, width: "100%", margin: "0 auto", padding: 24 }}>
<Component />
</div>
</Reshaped>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...