Skip to content

Range Date Picker

Range Date Picker widgets are Input Fields that let the user enter one or more date ranges in a single compact field: they can type the ranges using their keyboard or open a drop-down calendar popover to select them visually. Clicking a pill or pressing Enter navigates the calendar to that range’s month. For an always-visible inline variant, use the Range Calendar.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges"
}
]
}

Use these props to customize your Range Date Picker widget.

proptypedescription
disabledDateRangeMessagestring | LocalizableError message shown when a typed date falls inside a disabled range
disabledRangesarrayArray of objects ({ start: string, end?: string }) defining disabled date ranges
endDateAriaLabelstringAria label for the end date field group. Defaults to End date
hintstringA description to display below the input fields
iconstringCustom icon class to display inside the input visually (e.g. fas fa-calendar)
invalidDateMessagestring | LocalizableError message shown when a typed date does not exist, e.g. February 30
maxDatestringLatest allowed date (ISO date, inclusive); later calendar days render disabled
maxDateMessagestring | LocalizableError message shown when a typed date is after maxDate
minDatestringEarliest allowed date (ISO date, inclusive); earlier calendar days render disabled
minDateMessagestring | LocalizableError message shown when a typed date is before minDate
nextMonthAriaLabelstringARIA label for the next month button
nextMonthIconstringCustom CSS class for the “next month” button inside the calendar
numberOfMonthsnumberNumber of months to display simultaneously in the popover. Defaults to 1
prevMonthAriaLabelstringARIA label for the previous month button
prevMonthIconstringCustom CSS class for the “previous month” button inside the calendar
removePillAriaLabelstringAria label for the remove pill action. Defaults to Remove date
separatorstringThe separator between start and end date fields. Defaults to -
startDateAriaLabelstringAria label for the start date field group. Defaults to Start date

Use the property hint to add descriptive text.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
hint: 'Select one or more date ranges from the calendar.',
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges",
"props": {
"hint": "Select one or more date ranges from the calendar."
}
}
]
}

Use the property icon to add an icon, which appears next to the toggle chevron.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
icon: 'calendar_month',
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges",
"props": {
"icon": "calendar_month"
}
}
]
}

Use the properties prevMonthIcon, nextMonthIcon, prevMonthAriaLabel, and nextMonthAriaLabel to customize the navigation buttons within the calendar popover.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
prevMonthIcon: 'chevron_left',
nextMonthIcon: 'chevron_right',
prevMonthAriaLabel: 'Go to previous month',
nextMonthAriaLabel: 'Go to next month',
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges",
"props": {
"prevMonthIcon": "chevron_left",
"nextMonthIcon": "chevron_right",
"prevMonthAriaLabel": "Go to previous month",
"nextMonthAriaLabel": "Go to next month"
}
}
]
}

Use the property separator to customize the text displayed between the start date and end date fields. By default the separator is -.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
separator: 'to',
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges",
"props": {
"separator": "to"
}
}
]
}

Use the properties removePillAriaLabel, startDateAriaLabel and endDateAriaLabel to customize the accessibility labels for screen readers. These properties are localizable.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('dateRanges', {
removePillAriaLabel: 'Delete range',
startDateAriaLabel: 'From date',
endDateAriaLabel: 'To date',
label: 'Date Ranges',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "dateRanges",
"label": "Date Ranges",
"props": {
"removePillAriaLabel": "Delete range",
"startDateAriaLabel": "From date",
"endDateAriaLabel": "To date"
}
}
]
}

Use minDate and maxDate (ISO dates, both inclusive) to bound the selectable range, and disabledRanges to disable specific date blocks. Out-of-range days render disabled in the calendar popover, and a typed date that violates a boundary raises an input error; customize (and localize) the messages with minDateMessage, maxDateMessage and disabledDateRangeMessage.

range-date-picker.ts
import { gui } from '@golemui/gui-shared';
export default [
gui.inputs.rangeDatePicker('holidayPeriods', {
hint: 'Plan holidays between 2026-02-01 and 2026-07-31',
minDate: '2026-02-01',
maxDate: '2026-07-31',
disabledRanges: [
{
start: '2026-02-09',
end: '2026-02-10',
},
{
start: '2026-02-17',
},
],
minDateMessage: 'No holidays before February 2026',
maxDateMessage: 'No holidays after July 2026',
disabledDateRangeMessage: 'This date is not available',
label: 'Holiday Periods',
}),
];
range-date-picker.json
{
"$schema": "https://golemui.com/schemas/form.schema.json",
"form": [
{
"kind": "input",
"type": "rangeDatePicker",
"path": "holidayPeriods",
"label": "Holiday Periods",
"props": {
"hint": "Plan holidays between 2026-02-01 and 2026-07-31",
"minDate": "2026-02-01",
"maxDate": "2026-07-31",
"disabledRanges": [
{
"start": "2026-02-09",
"end": "2026-02-10"
},
{
"start": "2026-02-17"
}
],
"minDateMessage": "No holidays before February 2026",
"maxDateMessage": "No holidays after July 2026",
"disabledDateRangeMessage": "This date is not available"
}
}
]
}

Range Date Pickers can be styled as explained in the Styling Guide. The typed field and the popover calendar each have their own styling variables.

Following you will find a list with the CSS Variables specific to the Range Date Picker popover positioning and toggle, plus those inherited from its sub-widgets.

CSS VariableDescription
--gui-radius-mdInteractive calendar container, day button, and pill border radius
--gui-bg-defaultInteractive calendar background color
--gui-border-defaultInteractive calendar border color, hover day border, pills wrapper border
--gui-space-3Internal padding within the calendar view and day buttons
--gui-text-defaultInput text color and day buttons text color
--gui-bg-disabledDisabled day background color
--gui-intent-primarySelected day and pill background color
--gui-intent-primary-hoverToday’s day border color
--gui-intent-errorBorder and focus shadow color when invalid
--gui-border-focusBorder color when a pill or input is focused
--gui-shadow-focusBox shadow when a pill or input is focused

This is the anatomy of the Range Date Picker Widget in case you want to use your CSS styles.

range-date-picker-anatomy.html
<div class="gui-form">
<gui-range-date-picker>
<label for="fieldUid">
Label
<div class="gui-widget-hint" id="fieldUid_hint">Hint</div>
</label>
<div class="gui-widget" aria-expanded="true">
<gui-range-date>
<div class="gui-range-date-input gui-range-date-input--icon" role="group">
<span class="gui-widget-icon calendar_month"></span>
<div class="gui-range-date-input__pills-wrapper">
<div class="gui-range-date-input__pills" role="list">
<span class="gui-sentinel gui-sentinel__start"></span>
<div class="gui-range-date-input__pill" role="listitem" tabindex="0">
<span class="gui-range-date-input__pill-text">01/01/2025 - 01/31/2025</span>
<button type="button" class="gui-range-date-input__pill-remove" tabindex="-1">&times;</button>
</div>
<span class="gui-sentinel gui-sentinel__end"></span>
</div>
</div>
<div class="gui-range-date-input__pills-compact">
<button type="button" class="gui-range-date-input__pill gui-range-date-input__pill--count">1</button>
</div>
<div class="gui-range-date-input__inputs">
<div class="gui-range-date-input__field" role="group" aria-label="Start date">
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part" data-type="month" data-group="start" maxlength="2" placeholder="mm" tabindex="0">
<div class="gui-range-date-input__visual-underline"></div>
</div>
<span class="gui-range-date-input__separator">/</span>
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part" data-type="day" data-group="start" maxlength="2" placeholder="dd" tabindex="-1">
<div class="gui-range-date-input__visual-underline"></div>
</div>
<span class="gui-range-date-input__separator">/</span>
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part gui-range-date-input__year" data-type="year" data-group="start" maxlength="4" placeholder="yyyy" tabindex="-1">
<div class="gui-range-date-input__visual-underline"></div>
</div>
</div>
<span class="gui-range-date-input__separator">-</span>
<div class="gui-range-date-input__field" role="group" aria-label="End date">
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part" data-type="month" data-group="end" maxlength="2" placeholder="mm" tabindex="-1">
<div class="gui-range-date-input__visual-underline"></div>
</div>
<span class="gui-range-date-input__separator">/</span>
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part" data-type="day" data-group="end" maxlength="2" placeholder="dd" tabindex="-1">
<div class="gui-range-date-input__visual-underline"></div>
</div>
<span class="gui-range-date-input__separator">/</span>
<div class="gui-range-date-input__touch-target">
<input type="text" inputmode="numeric" class="gui-range-date-input__part gui-range-date-input__year" data-type="year" data-group="end" maxlength="4" placeholder="yyyy" tabindex="-1">
<div class="gui-range-date-input__visual-underline"></div>
</div>
</div>
</div>
</div>
</gui-range-date>
<gui-range-calendar>
<div class="gui-calendar-input">
<div class="gui-calendar__header">
<button class="gui-button gui-calendar__month-button gui-calendar__month-button--prev" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 256 256"><path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path></svg></button>
<span aria-live="polite">January 2025</span>
<button class="gui-button gui-calendar__month-button gui-calendar__month-button--next" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 256 256"><path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"></path></svg></button>
</div>
<div class="gui-calendar__days-grid" role="grid">
<!-- Calendar grid -->
</div>
</div>
</gui-range-calendar>
</div>
</gui-range-date-picker>
</div>