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

big-l-date-picker

v1.4.1

Published

A simple and lightweight date picker component for React.

Readme

Big L DatePicker

NPM Version

A lightweight and fully customizable React Date Picker — freely customize how days, months, and years are rendered.
No enforced styling, no opinionated themes — you control the calendar UI.

🆕 New: Range Selection

Now supporting range selection with mode="range" and a customizable maxRangeDays limit. Instantly respond to every change in the selected range, enabling dynamic, real-time interactions—perfect for bookings and interval-based flows. Highly recommended for developers needing precise control over date ranges.

For change requests or feature suggestions, please reach out at [email protected].

Live Demo

Big L Date Picker Screenshot

📦 Installation

npm install big-l-date-picker

OR

yarn add big-l-date-picker

| Prop | Type | Default | Description | | --------------------- | ----------------------------------------------- | -------------- | --------------------------------------------------------------------------- | | mode | 'single' \| 'range' | 'single' | 'single' = one date; 'range' = multiple dates (up to maxRangeDays) | | maxRangeDays | number | 2 | When mode="range", max number of days selectable (increase for longer ranges) | | value | Date | — | Current selected date (single mode) | | valueRange | Date[] | — | Selected dates (range mode, controlled) | | onChange | (value: Date \| undefined) => void | — | Callback when the single date changes | | onRangeChange | (dates: Date[]) => void | — | Callback when the selected range changes | | onDateRangeChange | (dates: Date[]) => void | — | Emitter for date range changes only (fires on every add/remove day) | | closeDatePicker | boolean | false | Automatically close the picker after selecting a date | | placeholder | string | "dd/mm/yyyy" | Placeholder text for the input | | showLabel | boolean | false | Show a label above the date picker | | className | string | "" | Custom CSS class for styling | | disabled | boolean | false | Disable the date picker input | | label | string | "" | Label text when showLabel is true | | name | string | "" | Name attribute for form usage | | id | string | "" | ID attribute for the input | | disableFutureDates | boolean | false | Prevent selecting future dates | | disablePastDates | boolean | false | Prevent selecting past dates | | minDate | Date | — | Minimum selectable date | | maxDate | Date | — | Maximum selectable date | | weekStartsOnSunday | boolean | true | Start the week on Sunday (false = Monday) | | gridPosition | GridPosition ("left" \| "center" \| "right") | "center" | Position of the date picker grid relative to the input | | renderDays | (days: dayItem[]) => dayItem[] | — | Custom transformer to modify or style generated day items | | renderMonths | (months: monthItem[]) => monthItem[] | — | Custom transformer to modify or style generated month items | | renderYears | (years: yearItem[]) => yearItem[] | — | Custom transformer to modify or style generated year items |

🖥 Usage Example

import React, { useState } from "react";
import { DatePicker } from "big-l-date-picker";

export default function App() {
  const [selectedDate, setSelectedDate] = useState<Date | undefined>(new Date());

  const handleDateChange = (date: Date | undefined) => {
    setSelectedDate(date);
  };

  return (
    <div style={{ maxWidth: 300 }}>
      <DatePicker
        onChange={handleDateChange}
        closeDatePicker={true}
        placeholder="Select a date"
        value={selectedDate}
        label="Choose Date"
        showLabel
        disabled={false}
        id="date-picker"
        name="date"
        className="custom-datepicker"
         renderDays={(days) => {
            return days.map((day) => {
                if (day.date < new Date()) {
                    day.custom = <div style={{ display: "flex", flexDirection: 'column', alignItems: 'center' }}>
                        <div style={{ fontSize: 12 }}>{day.label}</div>
                        <div style={{ fontSize: 8, color: 'green' }}>₹{Math.abs(10 - Number(day.label)).toFixed(2)}</div>
                    </div>;
                }

                return day;
            });
        }}
        renderMonths={(months) => {
            return months.map((month) => {
                if (month.month <= 9) {
                    month.custom = <div style={{ display: "flex", flexDirection: 'column', alignItems: 'center' }}>
                        <div style={{ fontSize: 12 }}>{month.label}</div>
                        <div style={{ fontSize: 12, color: 'red' }}>Offer!</div>
                    </div>;
                }

                return month;
            });
        }}
        renderYears={(years) => {
            return years.map((year) => {
                if (year.year <= 2025 && year.year > 2010) {
                    year.custom = <div style={{ display: "flex", flexDirection: 'column', alignItems: 'center' }}>
                        <div style={{ fontSize: 12 }}>{year.label}</div>
                        <div style={{ fontSize: 8, color: 'blue' }}>Discount!</div>
                    </div>;
                }

                return year;
            });
        }}
      />
    </div>
  );
}

📅 Date range mode

Use mode="range" to let users select multiple days. By default up to 2 days can be selected; pass maxRangeDays to allow more. Click a day to add it, click again to remove. Days between first and last selected are shown as in-range.

import React, { useState } from "react";
import { DatePicker } from "big-l-date-picker";

export default function RangeExample() {
  const [range, setRange] = useState<Date[]>([]);

  return (
    <DatePicker
      mode="range"
      maxRangeDays={7}
      valueRange={range}
      onDateRangeChange={(dates) => setRange(dates)}
      placeholder="Select up to 7 days"
      label="Date range"
      showLabel
    />
  );
}
  • Uncontrolled: Omit valueRange and use onDateRangeChange or onRangeChange to read the selection.
  • Default range: With no maxRangeDays, the limit is 2 days; use maxRangeDays={7} (or any number) to allow more.

Made with ❤️ from Kerala, India 🌴