@usevyre/react@usevyre/vue

Calendar

An always-visible date grid supporting single date, date range, and multiple date selection, with month/year navigation, an optional time picker, and min/max/disabled constraints. For an input-triggered popover useDatePicker; for start/end ranges with presets useDateRangePicker. Zero dependencies — built on native Intl APIs.


Single date

Default mode. Click any day to select it. Click again to deselect.

Mo
Tu
We
Th
Fr
Sa
Su
import { Calendar } from "@usevyre/react";

const [date, setDate] = useState<Date | null>(null);

<Calendar mode="single" value={date} onChange={setDate} />

Date range

Set mode="range". First click sets the start date, second click sets the end. Hover previews the range before confirming.

Mo
Tu
We
Th
Fr
Sa
Su
import { Calendar } from "@usevyre/react";

const [range, setRange] = useState<[Date | null, Date | null]>([null, null]);

<Calendar mode="range" value={range} onChange={setRange} />

With time picker

Add showTime to include an HH:MM input below the grid. The time is stored in the same Date object.

Mo
Tu
We
Th
Fr
Sa
Su
:
import { Calendar } from "@usevyre/react";

const [date, setDate] = useState<Date | null>(null);

<Calendar mode="single" showTime value={date} onChange={setDate} />

Props

Props

PropTypeDefaultDescription
mode"single" | "range" | "multiple""single"Selection mode. single picks one date, range picks start–end, multiple picks any number of dates.
value / v-modelDate | [Date|null, Date|null] | Date[]Controlled selected value. Type depends on mode.
onChange / @update:modelValue(v) => voidCalled when the selection changes.
showTimebooleanfalseAdds an HH:MM time picker below the calendar grid.
minDateDateDates before this are disabled.
maxDateDateDates after this are disabled.
disabled(date: Date) => booleanCustom callback to disable specific dates.
weekStartsOn0 | 11First day of the week. 0 = Sunday, 1 = Monday.
defaultMonthDateMonth displayed initially when value is empty (uncontrolled view).
class / classNamestringAdditional CSS class on the root element.