Getting Started with Styled

The styled package provides pre-styled date picker components with built-in CSS. No CSS framework required.

Installation

npm install react-date-range-picker-styled

After installing, import the CSS in your app entry point:

import "react-date-range-picker-styled/rdrp-styles.css";

Quick Start

import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";
function Basic() {
const [value, setValue] = useState<Date | null>(null);
return <DatePicker value={value} onChange={setValue} />;
}

What’s Included

ComponentDescription
DatePickerSingle date selection with popup calendar
DateRangePickerDate range selection with dual calendar and presets
DateTimePickerDate + time selection with time scroll panel
DateRangeTimePickerDate range + time selection
TimePickerStandalone time selection

All components support:

  • Controlled value with value / onChange
  • Keyboard navigation
  • Dark mode via CSS variables
  • 4 sizes: small, medium, large, x-large
  • Compound Component API for customization

TypeScript Types

All configuration and data types are re-exported from the package — no need to install the headless package separately:

import type {
Locale,
DatePickerSize,
TimeConfig,
MinuteStep,
SecondStep,
TimePrecision,
HourFormat,
TimePeriod,
CaptionLayout,
WeekDay,
DateRangePreset,
CalendarMonth,
DayProps,
} from "react-date-range-picker-styled";

These types are useful for:

  • Locale — Custom locale overrides (weekday names, button labels, date formatting)
  • DatePickerSize — Typing the size prop ("small" | "medium" | "large" | "x-large")
  • TimeConfig — Configuring time picker precision, format, and steps
  • DateRangePreset — Defining presets for DateRangePicker / DateRangeTimePicker
  • CalendarMonth, DayProps — Custom rendering with Compound Components

See Headless Types for detailed type definitions.

Next Steps