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

@bikiran/chronopick

v1.1.4

Published

A simple and reusable React input component library

Readme

@bikiran/chronopick

npm Version npm Downloads GitHub License GitHub Issues GitHub Stars GitHub Last Commit

A modern, accessible, and highly customizable React date and time picker component with Tailwind CSS styling. Perfect for building intuitive date selection experiences in your applications.

Features

  • 🗓️ Multiple selection modes: Single date, multiple dates, and date range selection
  • Time selection: Optional time picker with 12/24 hour format
  • Accessibility first: ARIA compliant with keyboard navigation
  • 🎨 Tailwind CSS: Customizable styling with utility classes
  • 📱 Responsive design: Works seamlessly across devices
  • 🌓 Dark mode: Built-in dark theme support
  • 📅 Date constraints: Min/max dates and custom disabled dates
  • 🚀 Performance optimized: Efficient rendering with React hooks
  • 🎭 Inline & dropdown modes: Flexible display options
  • 🌐 Localization support: English included (extensible)

Installation

npm install @bikiran/chronopick
# or
yarn add @bikiran/chronopick

Usage

Basic Usage

import React, { useState } from 'react';
import { ChronoPick } from '@bikiran/chronopick';
import '@bikiran/chronopick/dist/style.css';

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

  return (
    <ChronoPick
      value={date}
      onChange={setDate}
      placeholder="Select a date"
    />
  );
}

Multiple Date Selection

import { ChronoPick, ChronoPickMode } from '@bikiran/chronopick';

function App() {
  const [dates, setDates] = useState<Date[]>([]);

  return (
    <ChronoPick
      value={dates}
      onChange={setDates}
      mode={ChronoPickMode.Multiple}
      placeholder="Select multiple dates"
    />
  );
}

Date Range with Time Selection

import { ChronoPick, DateRange } from '@bikiran/chronopick';

function App() {
  const [dateRange, setDateRange] = useState<DateRange>({ 
    from: null, 
    to: null 
  });

  return (
    <ChronoPick
      value={dateRange}
      onChange={setDateRange}
      mode="range"
      enableTime={true}
      placeholder="Select date range with time"
    />
  );
}

Inline Calendar

<ChronoPick
  value={date}
  onChange={setDate}
  inline={true}
/>

API Reference

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | Date \| Date[] \| DateRange \| null | - | Current selected date(s) (required) | | onChange | (date: SelectedDateType) => void | - | Selection change handler (required) | | mode | 'single' \| 'multiple' \| 'range' | 'single' | Selection mode | | minDate | Date | - | Minimum selectable date | | maxDate | Date | - | Maximum selectable date | | disabledDates | Date[] \| ((date: Date) => boolean) | - | Disabled dates or validation function | | dateFormat | string | 'YYYY-MM-DD' | Date format string (see below) | | inline | boolean | false | Render calendar inline | | placeholder | string | 'Select Date' | Input placeholder text | | enableTime | boolean | false | Enable time selection |

Date Formatting

Format your dates using these tokens:

| Token | Output | Example | |-------|-----------------|--------------| | YYYY | Full year | 2024 | | YY | Two-digit year | 24 | | MMMM | Full month | January | | MMM | Short month | Jan | | MM | Padded month | 01 | | M | Numeric month | 1 | | DD | Padded day | 05 | | D | Numeric day | 5 | | dddd | Full weekday | Monday | | ddd | Short weekday | Mon | | hh | 12-hour (padded)| 09 | | h | 12-hour | 9 | | HH | 24-hour (padded)| 21 | | H | 24-hour | 21 | | mm | Minutes (padded)| 05 | | m | Minutes | 5 | | K | AM/PM | AM |

Example format: "dddd, MMMM D, YYYY hh:mm K" → "Monday, January 15, 2024 09:30 AM"

Customization

Styling with Tailwind

The component is fully stylable with Tailwind CSS. Import the base styles:

import '@bikiran/chronopick/dist/style.css';

Then override these classes in your project:

/* Example customizations */
.chronopick-container {
  @apply shadow-lg rounded-xl;
}

.chronopick-day.selected {
  @apply bg-blue-600 text-white;
}

.chronopick-day.inRange {
  @apply bg-blue-100;
}

Theming

Enable dark mode by adding the dark class to your parent element:

<html class="dark">
  <!-- your app -->
</html>

Accessibility

ChronoPick meets WCAG 2.1 AA standards with:

  • Full keyboard navigation
  • ARIA roles and attributes
  • Screen reader announcements
  • Focus management
  • High contrast support

Keyboard Controls:

  • ↑→↓←: Navigate between dates
  • Enter: Select date
  • Escape: Close picker
  • Tab: Cycle through controls
  • Page Up/Down: Navigate months
  • Shift + Page Up/Down: Navigate years

Development

Contributing

  1. Clone the repository:
git clone https://github.com/bikirandev/chronopick.git
cd chronopick
  1. Install dependencies:
npm install
  1. Start development server:
npm run dev
  1. Build production version:
npm run build

Project Structure

src/
├── components/
│   ├── ChronoPick/
│   │   ├── ChronoPick.tsx        # Main component
│   │   ├── ChronoPickInput.tsx   # Input field
│   │   ├── ChronoPickHeader.tsx  # Calendar header
│   │   ├── CalendarViews/        # Day/Month/Year views
│   │   └── TimePicker.tsx        # Time selection
├── hooks/
│   └── useChronoPickCore.ts      # Core logic hook
├── types/
│   └── index.ts                  # Type definitions
└── utils/
    └── dateUtils.ts              # Date utilities

License

MIT © Bikiran


Aurthor

Develop by Bikiran

Need Help?
Open an issue on GitHub