Skip to content
Range with presets, light
Light
Range with presets, dark
Dark

Every state

  • Range with presets, default, light
    Range with presets, default, dark

    default

  • Range with presets, focus, light
    Range with presets, focus, dark

    focus

  • Range with presets, open, light
    Range with presets, open, dark

    open

  • Range with presets, range-selected, light
    Range with presets, range-selected, dark

    range-selected

  • Range with presets, filled, light
    Range with presets, filled, dark

    filled

  • Range with presets, error, light
    Range with presets, error, dark

    error

  • Range with presets, disabled, light
    Range with presets, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"report-dates"Id of the trigger; the panel and error ids hang off it.
labelstring"Report period"The field's visible label.
descriptionstring–Help line under the field.
fromNamestring"from"Form name of the hidden first day (ISO yyyy-mm-dd).
toNamestring"to"Form name of the hidden last day (ISO yyyy-mm-dd).
defaultValue{ from: string; to: string }–The range at the start, as ISO dates.
defaultOpenboolean–Opens the panel at the start.
presetsDatePickerRangePreset[]–Presets: id, label and a range(today) function. Defaults to Today, Last 7 days, Last 30 days, This month, Last month and This year.
maxstring–The last day that can be picked, ISO yyyy-mm-dd.
todayDate–Today's date; defaults to the real today.
localestring"en-GB"Locale for every date shown.
placeholderstring"Choose dates"Text in the field before a range is set.
onValueChange(value: { from: string; to: string }) => void–Called with the ISO range on Apply.
requiredboolean–Marks the field as required.
disabledboolean–Disables the field.
errorstring–Error message; marks the field invalid.
classNamestring–Extra classes on the wrapper.

More date pickers

All 10
date-picker-08 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans