Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

CompareInputs

Date Range Picker in five frameworks

The same example, live in each framework. One core underneath, so they should behave the same.

Back to the Date Range Picker docs

Live

React

Loading19.3.1

Loading React…

No event yet

Vue

Loading3.5.44

Loading Vue…

No event yet

Svelte

Loading5.57.3

Loading Svelte…

No event yet

Solid

Loading2.0.0-rc.21

Loading Solid…

No event yet

Angular

Loading22.2.4

Loading Angular…

No event yet

The attributes each framework puts on the open popup, read from the page.

AttributeReactVueSvelteSolidAngular
roleClosedClosedClosedClosedClosed
aria-modalClosedClosedClosedClosedClosed
aria-labelledbyClosedClosedClosedClosedClosed
data-openClosedClosedClosedClosedClosed

Nothing open. Open a tile to fill its column.

Each tile sets modal to false, so five popups can be open at once; that is why aria-modal reads absent.

The same example, in each framework

Each tile above runs this file.

DateRangePicker.tsx
import * as React from 'react'
import { Calendar } from '@hamur/react/calendar'
import { DateRangePicker } from '@hamur/react/date-range-picker'
import { Field } from '@hamur/react/field'

export default function DateRangePickerExample() {
  const [stay, setStay] = React.useState<{ start: string; end: string } | null>(null)
  return (
    <div className="stack">
      <Field.Root className="field">
        <Field.Label>Stay</Field.Label>
        <DateRangePicker.Root
          locale="en-US"
          today="2026-11-07"
          onValueChange={setStay}
        >
          <DateRangePicker.Control className="date-field date-picker-control">
            <DateRangePicker.Input
              type="start"
              className="date-field-input date-range-picker-input"
            />
            <DateRangePicker.Separator
              className="date-range-picker-separator"
            >
              –
            </DateRangePicker.Separator>
            <DateRangePicker.Input
              type="end"
              className="date-field-input date-range-picker-input"
            />
            <DateRangePicker.Clear className="date-field-clear">
              ×
            </DateRangePicker.Clear>
            <DateRangePicker.Trigger className="date-picker-trigger">
              <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true">
                <path d="M2.5 3.5h11v10h-11zM2.5 6.5h11M5.5 1.5v3M10.5 1.5v3" />
              </svg>
            </DateRangePicker.Trigger>
          </DateRangePicker.Control>
          <DateRangePicker.Portal>
            <DateRangePicker.Positioner sideOffset={8}>
              <DateRangePicker.Popup className="popover date-picker-popup">
                <DateRangePicker.Calendar className="calendar">
                  <div className="calendar-header">
                    <Calendar.PrevButton className="calendar-nav">‹</Calendar.PrevButton>
                    <Calendar.Heading className="calendar-heading" />
                    <Calendar.NextButton className="calendar-nav">›</Calendar.NextButton>
                  </div>
                  <Calendar.Grid className="calendar-grid">
                    {(grid) => (
                      <>
                        <Calendar.GridHeader>
                          <Calendar.GridRow>
                            {grid.weekdays.map((weekday) => (
                              <Calendar.HeaderCell
                                key={weekday.index}
                                weekday={weekday.index}
                                className="calendar-weekday"
                              />
                            ))}
                          </Calendar.GridRow>
                        </Calendar.GridHeader>
                        <Calendar.GridBody>
                          {grid.weeks.map((week, index) => (
                            <Calendar.GridRow key={index}>
                              {week.map((day) => (
                                <Calendar.Cell
                                  key={day.date}
                                  date={day.date}
                                  className="calendar-cell"
                                >
                                  <Calendar.Day className="calendar-day" />
                                </Calendar.Cell>
                              ))}
                            </Calendar.GridRow>
                          ))}
                        </Calendar.GridBody>
                      </>
                    )}
                  </Calendar.Grid>
                </DateRangePicker.Calendar>
                <DateRangePicker.Close className="button date-picker-close">
                  Close
                </DateRangePicker.Close>
              </DateRangePicker.Popup>
            </DateRangePicker.Positioner>
          </DateRangePicker.Portal>
        </DateRangePicker.Root>
      </Field.Root>
      <p className="muted">Stay: {stay ? `${stay.start} to ${stay.end}` : 'none'}</p>
    </div>
  )
}

Measured, per framework

The frameworks against each other only, on the same machine and the same example.

FrameworkTestsSizeOpenCloseMemory
ReactNot measured yetNot measured yetNot measured yetNot measured yetNot measured yet
VueNot measured yetNot measured yetNot measured yetNot measured yetNot measured yet
SvelteNot measured yetNot measured yetNot measured yetNot measured yetNot measured yet
SolidNot measured yetNot measured yetNot measured yetNot measured yetNot measured yet
AngularNot measured yetNot measured yetNot measured yetNot measured yetNot measured yet

Size is the gzip of the component's entry with core and dom. Open, Close and Memory are medians in Chromium 156 on Apple M3 Max; Memory is what one open and close leaves on the heap. Tests are Date Range Picker's passing tests in each framework's suites. [N] is a value not measured yet.

Same props, five spellings

The DateRangePicker.Root names in each framework's own syntax.

PropReactVueSvelteSolidAngular
openopenopenopenopen[open]
defaultOpendefaultOpendefault-opendefaultOpendefaultOpen[defaultOpen]
onOpenChangeeventonOpenChange@open-changeonOpenChangeonOpenChange(openChange)
onOpenChangeCompleteeventonOpenChangeComplete@open-change-completeonOpenChangeCompleteonOpenChangeComplete(openChangeComplete)
actionsRefactionsRefactions-refactionsRefactionsRef[actionsRef]
modalmodalmodalmodalmodal[modal]
closeOnSelectcloseOnSelectclose-on-selectcloseOnSelectcloseOnSelect[closeOnSelect]
minminminminmin[min]
maxmaxmaxmaxmax[max]
isDateUnavailableisDateUnavailableis-date-unavailableisDateUnavailableisDateUnavailable[isDateUnavailable]
isDateDisabledisDateDisabledis-date-disabledisDateDisabledisDateDisabled[isDateDisabled]
localelocalelocalelocalelocale[locale]
firstDayOfWeekfirstDayOfWeekfirst-day-of-weekfirstDayOfWeekfirstDayOfWeek[firstDayOfWeek]
visibleMonthvisibleMonthvisible-monthvisibleMonthvisibleMonth[visibleMonth]
onVisibleMonthChangeeventonVisibleMonthChange@visible-month-changeonVisibleMonthChangeonVisibleMonthChange(visibleMonthChange)
visibleMonthsvisibleMonthsvisible-monthsvisibleMonthsvisibleMonths[visibleMonths]
pageBehaviorpageBehaviorpage-behaviorpageBehaviorpageBehavior[pageBehavior]
fixedWeeksfixedWeeksfixed-weeksfixedWeeksfixedWeeks[fixedWeeks]
todaytodaytodaytodaytoday[today]
timeZonetimeZonetime-zonetimeZonetimeZone[timeZone]
labelslabelslabelslabelslabels[labels]
forceLeadingZerosforceLeadingZerosforce-leading-zerosforceLeadingZerosforceLeadingZeros[forceLeadingZeros]
placeholderValueplaceholderValueplaceholder-valueplaceholderValueplaceholderValue[placeholderValue]
autoAdvanceautoAdvanceauto-advanceautoAdvanceautoAdvance[autoAdvance]
segmentRolesegmentRolesegment-rolesegmentRolesegmentRole[segmentRole]
onIncompleteChangeeventonIncompleteChange@incomplete-changeonIncompleteChangeonIncompleteChange(incompleteChange)
disableddisableddisableddisableddisabled[disabled]
readOnlyreadOnlyread-onlyreadOnlyreadOnly[readOnly]
requiredrequiredrequiredrequiredrequired[required]
invalidinvalidinvalidinvalidinvalid[invalid]
namenamenamenamename[name]
formformformformform[form]
inputRefinputRefinput-refinputRefinputRef[inputRef]
childrenchildren#defaultchildrenchildrenng-content
valuevalue—valuevalue[value]
defaultValuedefaultValue—defaultValuedefaultValue[defaultValue]
onValueChangeeventonValueChange@value-changeonValueChangeonValueChange(valueChange)