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

a11y-datepicker-react

v0.0.6

Published

a lightweight, accessible, and customizable date picker component for React. Built with accessibility in mind, it provides seamless keyboard navigation and screen reader support.

Readme

a11y-datepicker-react

Npm package version repo size

a11y-datepicker-react is a lightweight, accessible, and customizable date picker component for React. Built with accessibility in mind, it provides seamless keyboard navigation and screen reader support.

Features

  • Customizable date formats
  • Lightweight and easy to integrate
  • Supports "click" or "hover" trigger actions
  • Built-in styling with the flexibility to override styles

Keyboard Accessible

When the calendar is opened, focus is set on the current date

  • Press ← / → arrow keys to moves focus to the previous or next day
  • Press ↑ / ↓ arrow keys to moves focus to the same day of previous or next week
  • Press ( Ctrl + → ) key to change to the next month
  • Press ( Ctrl + ← ) key to change to previous month
  • Press ( Shift + → ) key to change to the next year
  • Press ( Shift + ← ) key to change to previous year
  • Press ↵ Enter key to activate the selected date
  • Press Esc key to close the dialog modal

Usage

import React from "react";
import DatePicker from "vdp-a11y-datepicker";

const App = () => {
  const handleDateChange = (date) => {
    console.log("Selected date:", date.format("DD-MM-YYYY"));
  };

  return (
    <DatePicker
      placeholder="Select a date"
      format="DD-MM-YYYY"
      onChange={handleDateChange}
    />
  );
};

export default App;

Props

DatePicker Props

DatePicker Props

| Prop | Type | Default | Description | | ---------------- | ----------------------- | ------------------- | ------------------------------------------------------------------------------ | | placeholder | string | format value | Placeholder text for the input field. | | format | string | "DD-MM-YYYY" | Format in which the selected date is displayed. | | inputClassName | string | undefined | Additional CSS class names for styling the input field. | | trigger | click | hover | Determines how the date picker popover is triggered. | | onChange | (date: Dayjs) => void | undefined | Callback function triggered when a date is selected. Returns a Dayjs object. | | defaultValue | Dayjs | dayjs(Date.now()) | The default date value for the date selector. |

Styling

The date picker comes with minimal built-in styles to provide a good base. You can extend or override these styles by passing custom class names via the inputClassName prop or using CSS.

Example:

.custom-input {
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 10px;
}
<DatePicker placeholder="Select a date" inputClassName="custom-input" />

Accessibility

This component is designed to be accessible out of the box:

  • Uses ARIA attributes for screen reader support.
  • Fully keyboard-navigable.

Development

To contribute or modify the library locally:

Clone the repository. Install dependencies using npm install. Start the development server using npm run dev.


Feel free to report issues or contribute to this project!

Author

Developed by Valerian Dwi Purnomo. Feedback and contributions are always welcome!