Getting StartedInstallation and setup guides 6
FormInput and selection components 26
LayoutWorkflow and structural layout components 10
NavigationMenu surfaces and hierarchical actions 7
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 6
UtilityGeneral-purpose interface utilities 7

API reference

The default surface is tng-yearpicker. It wraps the shared datepicker with a year-only adapter and opens the year grid directly, closing automatically after selection and emitting a plain number.

tng-yearpicker (component)

Wrapper attachment

html
<tng-yearpicker
  [defaultValue]="2024"
  [minYear]="2000"
  [maxYear]="2030"
  placeholder="YYYY"
></tng-yearpicker>

Selection and value

PropertyTypeDefaultDetails
valuenumber | string | undefinedundefinedControlled year value. When set, the component reflects this year and emits valueChange on user interaction. Strings are coerced to integers.
defaultValuenumber | stringcurrentYear()Uncontrolled initial year used when no value input is provided. Defaults to the current calendar year.
minYearnumber | string | undefinedundefinedMinimum selectable year. Disables earlier years in the grid and constrains keyboard navigation.
maxYearnumber | string | undefinedundefinedMaximum selectable year. Disables later years in the grid and constrains keyboard navigation.
fixedMonthnumber | string0Month index (0-based) used for the internal anchor date. Useful when the downstream system expects a full Date but only cares about the year.
fixedDaynumber | string1Day used for the internal anchor date alongside fixedMonth.

Interaction and behavior

PropertyTypeDefaultDetails
allowManualInputbooleantrueAllows typing a four-digit year directly into the field. Invalid input is discarded on blur.
defaultOpenbooleanfalseSets the uncontrolled initial open state of the year grid popup.
readonlybooleanfalseMakes the text field read-only while still allowing calendar-based selection.
restoreFocusbooleantrueReturns focus to the trigger input after the popup closes.
yearPageSizenumber | string24Controls how many years are shown per page in the year grid. Minimum value is 4.

Accessibility and presentation

PropertyTypeDefaultDetails
disabledbooleanfalseDisables the field and all year grid interaction.
fullWidthbooleantrueMakes the host fill the available inline size.
invalidboolean | stringfalseForces invalid styling. Accepts a boolean attribute.
placeholderstring'YYYY'Hint text shown in the input when no year is selected.
requiredboolean | stringfalseMarks the field as required in form-field contexts. Accepts a boolean attribute.

Outputs

OutputTypeDetails
valueChangenumberEmits the selected year as a plain number after a grid click or successful manual input commit.
openChangebooleanEmits whenever the popup opens or closes.

Internal lifecycle notes

The year grid popup follows a two-step commit: when the user selects a year cell, the controller records it as a pending year and transitions to the month view. The component intercepts the viewChange event — when the view reaches month with a pending year, it emits valueChange and closes the popup immediately. This keeps the UX feeling instant without requiring a separate confirm button.

Form-field integration

tng-yearpicker registers itself with the TNG_FORM_FIELD_CONTROL token so it works seamlessly inside tng-form-field. The focusable element is the inner datepicker text input — clicking the form-field label routes focus there directly. The invalid and required inputs are forwarded to the shared control adapter so error and hint messaging renders correctly.