Skip to main content

Function: labelDayButton()

labelDayButton(date, modifiers, options?, dateLib?): string

Defined in: src/labels/labelDayButton.ts:19

Generates the ARIA label for a day button.

Use the modifiers argument to provide additional context for the label, such as indicating if the day is "today" or "selected."

Parameters

ParameterTypeDescription
dateDateThe date to format.
modifiersModifiersThe modifiers providing context for the day.
options?DateLibOptionsOptional configuration for the date formatting library.
dateLib?DateLibAn optional instance of the date formatting library.

Returns

string

The ARIA label for the day button.

Default Value

The formatted date.

See

https://daypicker.dev/docs/translation#aria-labels