Period Picker

<qds-period-picker> selects calendar reporting months, quarters or years through native year and localized unit editors. It supports scalar or inclusive start/end values, native forms, validation and the standard QDS field lifecycle. It loads no date-picker, calendar, editor or framework runtime.

Import and basic use

<script type="module" src="/assets/components/period-picker/qds-period-picker.js"></script>
<qds-period-picker label="Reporting month" name="period" value="2026-09" required></qds-period-picker>
<qds-period-picker granularity="quarter" label="Review quarters" name="quarters"
  range value='["2026-Q1","2026-Q3"]'></qds-period-picker>

Values and calendar policy

Public API

Member Contract
value, defaultValue Canonical string or cloned string pair
granularity, range Calendar unit and scalar/pair mode
min, max Inclusive canonical bounds
locale, formattedValue Localized month names/summary and read-only display string; canonical model unchanged
startLabel, endLabel Range endpoint name suffixes; defaults Start/End
label, aria-label, aria-labelledby Visible group name and explicit/external naming
name, form Native scalar/repeated submission key and external form ID
hint, errorText, invalid Instructions and application-owned errors
required, readonly, disabled, size, validateOn Standard QDS field states/feedback timing
validity, validationMessage, willValidate Field validity plus badInput, rangeUnderflow and rangeOverflow
checkValidity(), reportValidity(), setCustomValidity(), focus() Validation/focus methods

Native forms and events

Accessibility and themes

Examples and verification

The adjacent demo covers every granularity, paired ranges, native/external forms, reset/clear, bounds, locale, custom errors, readonly/disabled and typed events. Native and generated tests cover values, constraints, form state, keyboard behavior and light/dark themes. Run the repository verification gate for the complete acceptance checks.

Primary native contracts: HTML number input and HTML select.