> ## Documentation Index
> Fetch the complete documentation index at: https://committ.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# useCalendarRange

> Computes visible date range for the calendar grid.

# useCalendarRange

The useCalendarRange hook (hooks/calendar/useCalendarRange.ts) computes the start and end dates of the currently visible calendar grid.

***

## Computation

Based on the selectedDate from useCalendarStore and the current viewMode:

* **Week view:** Returns the Monday-to-Sunday range containing the selected date
* **Day view:** Returns a single-day range

The computed range is used by useCalendarEvents to scope the SQLite query for performance.
