ClickorKeyboard shortcut Alt + L

Dragto resize

Nord Design System SearchDeveloperDeveloperGetting startedUsing Web ComponentsWebfontsCDNLocalizationCSS Framework Legacy ESLint PluginWorking with AIFAQDesignDesignGetting startedFoundationsAccessibilityColor SystemColor UtilitiesPrinciplesFigma ToolkitGridIconographyNamingNordhealth BrandTypographyThemesBrand assetsToolsComponentsComponentsAccordion New Aside New Autocomplete New AvatarBadgeBanner Updated ButtonButton GroupCalendar Updated Card Updated Chart New Checkbox Updated Collapsible New Combobox New Command MenuData Table New Date Picker Updated Date Range Picker New DividerDrawer Updated DropdownEmpty StateField New FieldsetFilter Bar New FooterHeaderIconInput Updated Input Group New Item New Kbd New LayoutMessageMeter New Modal Updated NavigationNotificationNumber Field New Otp Field New Outline New Overflow List New Pagination New Popout Updated ProgressProgress BarQrcodeRadio Updated Range Updated Resizable New Rich Text Editor New Scroll Area New Segmented ControlSelect Updated SkeletonSpinnerStackTabTableTagTextarea Updated Time Picker New Timestamp New ToastToggle Updated TooltipTop BarTruncate New Visually HiddenDesign TokensDesign TokensTailwind CSSTailwind CSSBlocksBlocksTemplatesTemplatesIconsIconsPlaygroundPlaygroundLatest UpdatesLatest UpdatesChangelogChangelogMigration guidesMigration guides
GitHub

Clickto expandKeyboard shortcut Alt + L

Filter Date Range Light DOM & Tailwind

Open in Storybook

A date-range filter control — a chip trigger that opens a popout with presets and a calendar. It owns its selection, the date-range counterpart to Filter Dropdown.

Loading...

Usage

Filter Date Range is a complete date-range filter: a chip trigger that opens a popout containing the inline Date Range Picker — built-in presets, a two-month calendar (one month on narrow screens) and an Apply action. It is the date-range counterpart to Filter Dropdown and renders the shared filter chip via Filter Field.

import "@nordhealth/components/lib/FilterDateRange"

It works inside a Filter Bar alongside the other filters. The committed value is an ISO-8601 interval string YYYY-MM-DD/YYYY-MM-DD; the chip shows the formatted range ("Created is 2 Jun 2024 – 16 Jun 2024") for you. Listen for change and own the active-filter/URL state in your app.

Examples

Basic

Inactive, the chip is dashed and shows just the label. Set value (or apply a range in the popout) and it shows the formatted range, highlighted.

Removable

Add removable so the trailing affordance removes the whole filter (firing remove) instead of clearing it. Remove the filter from the bar in the handler.

Calendar only

Add hide-presets to drop the preset list and show only the calendar.

Min and max

Constrain the selectable dates with min and max (both ISO YYYY-MM-DD). Dates outside the range are disallowed in the calendar.

Sizes

The size attribute accepts s (default), m and l, matching the other filter controls.

Disabled

Set disabled to prevent interaction.

Accessibility

  • The chip trigger is a button associated with its popout via aria-controls, aria-haspopup and aria-expanded. The icon-only clear and remove buttons expose their purpose to assistive technology via visually-hidden labels.
  • The popout is a date-range picker dialog: the calendar is keyboard navigable and the presets and Apply action are reachable and labelled.
  • The control emits intent only (change, clear, remove) — keep the active-filter state your app maintains reflected on the chip so the current selection is announced.

API reference

FilterDateRange

Filter Date Range is a self-contained date-range **filter**: a chip that opens a popout containing an inline Date Range Picker (presets + two-month calendar + Apply). It is the date-range counterpart to Filter Dropdown and renders the shared filter chip via Filter Field. Composition-first: it emits change/clear/remove and leaves the active filters and any URL/query state to your app.

<nord-filter-date-range></nord-filter-date-range>

Props

PropertyAttribute Description TypeDefault
labellabelThe label naming what this filter targets, shown on the chip.string''
valuevalueThe committed range as an ISO-8601 interval string YYYY-MM-DD/YYYY-MM-DD, or "" for no selection.string''
minminEarliest selectable date (ISO-8601).string | undefined
maxmaxLatest selectable date (ISO-8601).string | undefined
hidePresetshide-presetsHides the built-in preset list, leaving only the calendar.booleanfalse
firstDayOfWeekfirst-day-of-weekFirst day of the week (0 = Sunday … 6 = Saturday).number | undefined
todaytodayOverrides "today" (ISO-8601), mainly for deterministic tests/demos.string | undefined
removableremovableWhether the whole filter can be removed. When true the trailing affordance is a remove button that fires remove; otherwise it is a clear button.booleanfalse
clearableclearableShows a clear (✕) button while there is a selection. Defaults to true.booleantrue
disableddisabledMakes the component disabled.booleanfalse
sizesizeThe size of the chip controls.'s' | 'm' | 'l''s'
namenameIdentifies the filter (e.g. for your app's active-filter state).string''
openopenWhether the popout is open.booleanfalse

Methods

Method nameParameters Description
show() => voidN/AOpen the popout.
hide() => voidN/AClose the popout.
EventDetail TypeDescription
changeFilterDateRangeChangeEventDispatched when the committed range changes (Apply or clear).
clearFilterDateRangeClearEventDispatched when the chip's clear affordance is pressed.
removeFilterDateRangeRemoveEventDispatched when the chip's remove affordance is pressed.
openNordEventDispatched when the popout is opened.
closeNordEventDispatched when the popout is closed.

CSS Properties

CSS Custom Properties provide more fine grain control over component presentation. We advise utilizing existing properties on the component before using these.

PropertyDescriptionDefault
--n-filter-date-range-popout-inline-sizeControls the inline size of the popout content.
Light DOM & Tailwind. This component renders in the light DOM, so you can style it directly with your own CSS or Tailwind utility classes — there is no shadow boundary, and its default styles are low specificity, so your utilities win.