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

@dooherceg/mui-date-range-picker

v0.2.7

Published

[![npm version](https://img.shields.io/npm/v/@dooherceg/mui-date-range-picker.svg)](https://www.npmjs.com/package/@dooherceg/mui-date-range-picker) [![npm downloads](https://img.shields.io/npm/dm/@dooherceg/mui-date-range-picker.svg)](https://www.npmjs.c

Readme

@dooherceg/mui-date-range-picker

npm version npm downloads license TypeScript

Reusable date range picker components for MUI built on top of @mui/x-date-pickers.

npm version

  • Latest package: https://www.npmjs.com/package/@dooherceg/mui-date-range-picker
  • Install command: npm install @dooherceg/mui-date-range-picker

Features

  • DateRangePicker for date-only range selection
  • DateTimeRangePicker for date and time range selection
  • Controlled and uncontrolled usage
  • Range preview while selecting the second boundary
  • MUI TextField styling support through variant, size, className, and sx
  • TypeScript types exported with the package

Installation

Install the package together with its peer dependencies:

npm install @dooherceg/mui-date-range-picker @mui/material @mui/x-date-pickers @emotion/react @emotion/styled dayjs react react-dom

Required setup

This package expects Dayjs-compatible values at runtime, so wrap your application, page, or story with MUI LocalizationProvider and AdapterDayjs.

import { LocalizationProvider } from "@mui/x-date-pickers/LocalizationProvider";
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";

export const AppProviders = ({ children }: { children: React.ReactNode }) => {
  return (
    <LocalizationProvider dateAdapter={AdapterDayjs}>
      {children}
    </LocalizationProvider>
  );
};

Exports

The package exports:

  • DateRangePicker
  • DateTimeRangePicker
  • DateRangeValue
  • BaseRangePickerProps
  • DateRangePickerProps
  • DateTimeRangePickerProps
  • DateTimeRangePickerTranslations

Quick start

DateRangePicker

import { useState } from "react";
import type { Dayjs } from "dayjs";
import {
  DateRangePicker,
  type DateRangeValue,
} from "@dooherceg/mui-date-range-picker";

export const DateRangeExample = () => {
  const [value, setValue] = useState<DateRangeValue<Dayjs>>({
    start: null,
    end: null,
  });

  return (
    <DateRangePicker
      value={value}
      onChange={setValue}
      format="DD/MM/YYYY"
      placeholder="Select date"
      separator=" - "
    />
  );
};

DateTimeRangePicker

import { useState } from "react";
import type { Dayjs } from "dayjs";
import {
  DateTimeRangePicker,
  type DateRangeValue,
} from "@dooherceg/mui-date-range-picker";

export const DateTimeRangeExample = () => {
  const [value, setValue] = useState<DateRangeValue<Dayjs>>({
    start: null,
    end: null,
  });

  return (
    <DateTimeRangePicker
      value={value}
      onChange={setValue}
      format="DD/MM/YYYY HH:mm"
      placeholder="Select date and time"
      translations={{
        prev: "Prev",
        next: "Next",
        selecting: "Selecting",
        from: "From",
        to: "To",
      }}
      timeSteps={{ hours: 1, minutes: 5 }}
    />
  );
};

Controlled and uncontrolled usage

Controlled usage:

<DateRangePicker value={value} onChange={setValue} />

Uncontrolled usage:

<DateRangePicker
  defaultValue={{ start: null, end: null }}
  onChange={(nextValue) => {
    console.log(nextValue);
  }}
/>

Shared types

import type {
  DateRangeValue,
  DateRangePickerProps,
  DateTimeRangePickerProps,
  DateTimeRangePickerTranslations,
} from "@dooherceg/mui-date-range-picker";

DateRangeValue

type DateRangeValue<TDate> = {
  start: TDate | null;
  end: TDate | null;
};

DateRangePicker props

| Prop | Type | Default | Description | | -------------- | --------------------------------- | ---------------------------- | ----------------------------------------------- | | value | DateRangeValue | undefined | Controlled range value. | | defaultValue | DateRangeValue | { start: null, end: null } | Initial value for uncontrolled usage. | | onChange | (value: DateRangeValue) => void | undefined | Called when the committed range changes. | | disabled | boolean | false | Disables the input and picker interactions. | | readOnly | boolean | false | Keeps the value visible but blocks interaction. | | minDate | PickerValidDate | undefined | Lower date boundary. | | maxDate | PickerValidDate | undefined | Upper date boundary. | | format | string | DD/MM/YYYY | Display format used in the input. | | placeholder | string | format | Placeholder used for empty boundaries. | | separator | string | - | Text rendered between start and end values. | | className | string | undefined | Class applied to the input root. | | sx | SxProps<Theme> | undefined | MUI system styles for the input root. | | variant | TextFieldProps["variant"] | outlined | MUI text field variant. | | size | TextFieldProps["size"] | small | MUI text field size. | | name | string | undefined | Name forwarded to the underlying input. |

DateTimeRangePicker props

DateTimeRangePicker supports all shared props above and adds:

| Prop | Type | Default | Description | | -------------- | ------------------------------------------ | -------------------------- | --------------------------------- | | translations | Partial<DateTimeRangePickerTranslations> | English defaults | Labels used in the toolbar. | | timeSteps | { hours?: number; minutes?: number } | { hours: 1, minutes: 1 } | Clock step configuration. | | format | string | DD/MM/YYYY HH:mm | Display format used in the input. |

DateTimeRangePickerTranslations

type DateTimeRangePickerTranslations = {
  prev: string;
  next: string;
  selecting: string;
  from: string;
  to: string;
};

Behavior notes

  • DateRangePicker shows an outline preview while the second date is being selected.
  • DateTimeRangePicker shows that preview only while the end boundary is active.
  • DateTimeRangePicker preserves the existing time when the date changes.
  • DateTimeRangePicker preserves the existing date when the time changes.
  • Both pickers normalize reversed selections into a valid range.
  • Both pickers render a read-only input and use the popup picker UI for changes.

Styling

Both components render a MUI TextField, so they fit naturally into an existing MUI design system.

<DateRangePicker variant="outlined" size="small" sx={{ minWidth: 320 }} />

License

MIT