A date picker component with range and presets.

Usage

import { DateRangePicker } from '@turbostack/ui'
const { start, end } = {
  start: subDays(new Date(), 30),
  end: new Date()
};

return (
  <DateRangePicker
    value={start && end ? {
      from: start,
      to: end
    } : undefined}
    onChange={(range => {
      if (!range || !range.from || !range.to) return;

      const { from, to } = range;

      // do something
    })}
  />
)