- Docs
- Components
- Dates
Date range picker
One field for a range: typed in either order, chosen in a range calendar, or a preset in one step.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.6
- Renders
<input> + calendarServer-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
Playground
Every prop, live, and the code it takes.
import { Field } from "@qeetrix/react";
import { DateRangePicker } from "@qeetrix/react/experimental";
<Field label="Period">
<DateRangePicker
presets={["today", "last7Days", "last30Days", "thisMonth", "lastMonth"]}
max={today}
/>
</Field>02
Typed or chosen
Type both dates, any separator, either order: "01/12/2026 – 31/12/2026". Or pick two days in the calendar.
<Field label="Period">
<DateRangePicker defaultValue={{ start: "2026-10-19", end: "2026-10-25" }} />
</Field>03
Presets
Ranges in one step beside the calendar, cut to min and max: ready-made by name, or your own.
<Field label="Sign-ins">
<DateRangePicker presets={["today", "last7Days", "last30Days", "thisMonth", "lastMonth"]} max={today} />
</Field>04
Limits
min, max and isDateDisabled: a range whose ends aren't allowed keeps its text, and the field says why as you leave it.
<Field label="Leave" validationMode="onBlur">
<DateRangePicker min={today} isDateDisabled={isDayOff} />
</Field>05
In a form
startName and endName: two hidden inputs submit "YYYY-MM-DD".
Export audit log
<Card title="Export audit log" level={3} footer={<Inline justify="end"><Button>Export CSV</Button></Inline>}>
<Field label="Period">
<DateRangePicker max={today} startName="from" endName="to" defaultValue={{ start: "2026-10-19", end: "2026-10-25" }} />
</Field>
</Card>06
In Hindi
Its presets, its calendar and its words come from QeetrixProvider.
<QeetrixProvider locale="hi-IN" messages={hi}>
<Field label="अवधि"><DateRangePicker presets={["last7Days", "thisMonth"]} /></Field>
</QeetrixProvider>