Calendar: Fixed today
Pass today to pin the highlighted day, for tests or another time zone. animate={false} turns off month transitions.
February 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
This adds the example as components/examples/calendar/fixed-today.tsx, together with the Calendar component and the HextaUI theme tokens it needs.
pnpm dlx shadcn@latest add https://hextaui.com/r/calendar-fixed-today.jsonTo add only the component, follow the Calendar installation.
Props in this example
The Calendar props this example sets, from the API reference.
| Prop | Type | Default |
|---|---|---|
modeWithout a mode, days are not selectable. | "single" | "multiple" | "range" | – |
selectedMatches the mode. | Date | Date[] | DateRange | – |
onSelect | (selected, triggerDate, modifiers, event) => void | – |
defaultMonth | Date | – |
animateMonth slide and height transitions. HextaUI default. | boolean | true |
todayDefaults to the client’s today, kept in sync across midnight and hydration. | Date | – |
Every prop is in the Calendar API reference.
- Range
- Range limits
- Multiple
- Month and year dropdowns
- Bounded
- Controlled month
- Week numbers
- Inside a sheet
- Right to left
See them all, with keyboard support and accessibility notes, on the Calendar page.
- ButtonButtons in every variant and size, with a built-in loading, success and error flow that skips the spinner for fast requests.
- MotionThe easing curves, durations and reduced-motion check every component animates with, plus hooks for size morphs and sliding highlights.
- useTodayToday's date that rolls over at midnight and when the tab comes back, without a hydration mismatch.
- CheckboxA checkbox whose check draws in, with indeterminate parents, groups and labels that share its hover.
- ComboboxA filterable select with chips, groups and async results, in a popup that resizes as you type.
- Date pickerA button that opens a calendar in a popover, or a bottom sheet on phones, for single dates and ranges.