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

twincal

v1.0.0

Published

**TwinCal** is a highly customizable and accessible **date range picker** for React, built using **styled-components** and **date-fns**. It’s perfect for modern design systems and clean UI/UX requirements.

Readme

🗓️ TwinCal – React Date Range Picker Component

TwinCal is a highly customizable and accessible date range picker for React, built using styled-components and date-fns. It’s perfect for modern design systems and clean UI/UX requirements.


✨ Features

  • 📅 Date range selection with start and end dates
  • 🧠 Built-in logic to disable past/future or custom dates
  • 🌍 Locale and format support via date-fns
  • 🎨 Multiple variants: outlined, filled, standard
  • 🧼 Clearable input option
  • 🧱 Full-width layout support
  • 🎯 Controlled open/close logic with onOpen / onClose handlers
  • 🧭 Optional left sidebar for quick range presets
  • 🎨 Customizable primary color
  • ♿ Fully accessible and keyboard-friendly

🚀 Installation

npm install twincal
# or
yarn add twincal

🧩 Usage

import React, { useState } from 'react';
import { DateRangePicker, DateRange } from 'twincal';

const App = () => {
  const [range, setRange] = useState<DateRange>({ startDate: null, endDate: null });

  return (
    <DateRangePicker
      value={range}
      onChange={setRange}
      disablePast
      format="dd/MM/yyyy"
      clearable
      variant="outlined"
    />
  );
};

📦 Props

| Prop | Type | Default | Description | |-------------------|---------------------------------------|--------------|-------------| | value | { startDate: Date \| null, endDate: Date \| null } | – | Controlled date range value | | onChange | (value: DateRange) => void | – | Callback on range selection | | disablePast | boolean | false | Disables selection of past dates | | disableFuture | boolean | false | Disables selection of future dates | | disableDates | (date: Date) => boolean | – | Custom logic to disable specific dates | | minDate | Date | – | Minimum selectable date | | maxDate | Date | – | Maximum selectable date | | locale | string | 'en-US' | Locale string for date formatting | | format | string | 'MM/dd/yyyy' | Custom format for displaying dates | | clearable | boolean | false | Show a clear icon to reset input | | inputPlaceholder| string | 'Select range' | Placeholder text | | fullWidth | boolean | false | Stretch to parent width | | variant | "outlined" \| "filled" \| "standard"| 'outlined' | Input styling variant | | disabled | boolean | false | Disable entire picker | | readOnly | boolean | false | Makes input read-only | | openOnFocus | boolean | true | Automatically open calendar on focus | | open | boolean | – | Control calendar visibility externally | | onOpen | () => void | – | Callback when calendar opens | | onClose | () => void | – | Callback when calendar closes | | showSidebar | boolean | false | Show sidebar with quick presets | | primaryColor | string | '#6366f1' | Customize primary theme color |


🎨 Variants

<DateRangePicker variant="filled" />
<DateRangePicker variant="outlined" />
<DateRangePicker variant="standard" />

📚 Format & Locale

Using date-fns under the hood, TwinCal supports format strings and locales:

<DateRangePicker format="dd MMM, yyyy" locale="en-GB" />

To change locale, make sure to import the appropriate date-fns/locale and pass it via locale.


📁 Types

export interface DateRange {
  startDate: Date | null;
  endDate: Date | null;
}

🧠 Roadmap

  • [x] Date range picker
  • [x] Variant styles
  • [x] Sidebar support
  • [ ] Time picker support
  • [ ] Dark mode
  • [ ] Mobile-native UI
  • [ ] i18n labels and accessibility roles

🧪 Local Development

# In your TwinCal root folder
npm link

# In your app or test project
npm link twincal

📜 License

MIT © 2025 Rajan Prajapati