Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Date range picker
A period, typed or picked. Type both ends into the field, or open two months side by side with shortcuts beside them.
Example
Pick a start, then an end. Hovering shows the range on the way.
ddmmyyyy
ddmmyyyy
from '' to ''
<DateRangePicker
bind:from
bind:to
presets={[lastDays(7), lastDays(30), thisMonth(), lastMonth(), thisYear()]}
/> Rules
- Both ends can be typed, and either can be left empty for an open-ended period.
- Pick the shortcuts for the view: recency for a log, months for a report. Build them from the shared presets so a period is called the same everywhere.
- Two months side by side from md; one on a phone.