npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-date-range-picker-styled

v1.0.3

Published

Date & range picker for React with built-in CSS — no Tailwind needed, CSS variables, dark mode, keyboard navigation, 15 locales

Readme

Part of the React Date Range Picker family — Also available: tailwind4 · tailwind3 · headless

Installation

npm install react-date-range-picker-styled

Import the stylesheet in your app entry:

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

Quick Start

Simple (One-liner)

import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";
import "react-date-range-picker-styled/rdrp-styles.css";

function App() {
  const [date, setDate] = useState<Date | null>(null);
  return <DatePicker value={date} onChange={setDate} />;
}

Date Range with Presets

import { useState } from "react";
import { DateRangePicker, type DateRangePreset } from "react-date-range-picker-styled";

const presets: DateRangePreset[] = [
  {
    label: "Last 7 days",
    value: () => {
      const end = new Date();
      const start = new Date();
      start.setDate(end.getDate() - 6);
      return { start, end };
    },
  },
];

function App() {
  const [range, setRange] = useState<{ start: Date | null; end: Date | null }>({
    start: null,
    end: null,
  });
  return <DateRangePicker value={range} onChange={setRange} presets={presets} />;
}

Date & Time Picker

import { useState } from "react";
import { DateTimePicker } from "react-date-range-picker-styled";

function App() {
  const [dateTime, setDateTime] = useState<Date | null>(null);

  return (
    <>
      {/* 24-hour format (default) */}
      <DateTimePicker value={dateTime} onChange={setDateTime} />

      {/* 12-hour format with seconds */}
      <DateTimePicker
        value={dateTime}
        onChange={setDateTime}
        time={{ hourFormat: "12", precision: "second" }}
      />
    </>
  );
}

Date Range & Time Picker

import { useState } from "react";
import { DateRangeTimePicker } from "react-date-range-picker-styled";

function App() {
  const [range, setRange] = useState<{ start: Date | null; end: Date | null }>({
    start: null,
    end: null,
  });

  return <DateRangeTimePicker value={range} onChange={setRange} time={{ hourFormat: "12" }} />;
}

Time Picker (Standalone)

import { useState } from "react";
import { TimePicker } from "react-date-range-picker-styled";

function App() {
  const [time, setTime] = useState<Date | null>(null);
  return <TimePicker value={time} onChange={setTime} />;
}

Compound Component (Full Customization)

import { useState } from "react";
import { DatePicker } from "react-date-range-picker-styled";

function App() {
  const [date, setDate] = useState<Date | null>(null);

  return (
    <DatePicker.Root value={date} onChange={setDate}>
      <DatePicker.Trigger />
      <DatePicker.Content>
        <DatePicker.Header>
          <DatePicker.PrevButton />
          <DatePicker.Title />
          <DatePicker.NextButton />
        </DatePicker.Header>
        <DatePicker.Grid />
        <DatePicker.Footer>
          <DatePicker.TodayButton />
          <DatePicker.ClearButton />
        </DatePicker.Footer>
      </DatePicker.Content>
    </DatePicker.Root>
  );
}

Components

| Component | Description | | --------------------- | --------------------------------- | | DatePicker | Single date selection | | DateRangePicker | Date range selection with presets | | DateTimePicker | Date + time selection | | DateRangeTimePicker | Date range + time selection | | TimePicker | Standalone time selection |

All components support simple and compound component patterns.

Features

  • Built-in CSS — No Tailwind or other framework needed
  • CSS variables for theming
  • Dark mode support
  • 4 sizes — small, medium, large, x-large
  • Keyboard navigation — Arrow keys, Enter, Escape, Tab
  • Date constraints — min/max date, min/max days, disabled dates
  • Range presets — Last 7 days, This month, etc.
  • Inline mode — Render calendar without popup
  • 15 locales — en, ko, ja, zh-Hans, zh-Hant, es, pt-BR, fr, de, ru, tr, it, vi, th, pl

Theming

Override CSS variables to customize the look:

:root {
  --rdrp-color-primary: #0ea5e9; /* sky-500 */
  --rdrp-color-bg: #ffffff;
  --rdrp-color-text: #0f172a; /* slate-900 */
  --rdrp-color-border: #e2e8f0; /* slate-200 */
}

.dark {
  --rdrp-color-bg: #020617; /* slate-950 */
  --rdrp-color-text: #f8fafc; /* slate-50 */
  --rdrp-color-border: #1e293b; /* slate-800 */
}

Using Tailwind?

Consider using the Tailwind-specific packages instead:

| Package | Description | | ------------------------------------------------------------------------------------------------------ | ------------------------------------ | | react-date-range-picker-tailwind4 | Tailwind CSS v4 + shadcn/ui registry | | react-date-range-picker-tailwind3 | Tailwind CSS v3 |

Other Packages

| Package | Description | | ---------------------------------------------------------------------------------------------------- | ---------------------------------- | | react-date-range-picker-headless | Headless hooks — bring your own UI |

Documentation

Full docs with live examples: dsikeres1.github.io/react-date-range-picker

Support

If this library helps you, consider buying me a coffee:

License

MIT