# PeriodPicker

> Fiscal-aware. Never assumes January.

Source: https://lopifi.com/components/period-picker
Part of: Lopifi — US GAAP books on autopilot, reviewed by a CPA (https://lopifi.com)

---

- **Family:** Statements — **The largest gap in the market.** Nothing else has these.
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/06-statements

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/period-picker
```

## Specification

Fiscal-aware. Takes `fiscalYearStartMonth` and labels accordingly — `FY26 Q1` may start in July.

- Presets: this month, last month, QTD, YTD, this fiscal quarter, this fiscal year, trailing 12.
- **Every preset shows its resolved dates.** "Last quarter (1 Apr – 30 Jun 2026)".
- Custom range with a two-month calendar.
- **Closed/locked periods are visually marked** and warn on selection, because a "closed" period's numbers shouldn't be changing.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
