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 🙏

© 2024 – Pkg Stats / Ryan Hefner

accessible-date-picker

v3.7.6

Published

An accessible datepicker. Supports natural language manual input, keyboard and screen readers.

Downloads

71

Readme

Accessible Date Picker

Accessible Date Picker is a component designed for React.js. Why yet another date picker? It is very difficult to find a date picker that is accessible, has an inclusive design and is easy to use by everyone. We at Axess Lab decided to build one and open source it so that others could benefit from it.

DatePicker

Getting Started

With an application built using the create-react-app script the easiest way to include Accessible Date Picker is to import it in to the file you will be using it in:

import DatePicker from "accessible-date-picker/dist/accessible-datepicker";

Then the component can be used as such:

< DatePicker value={value} setValue={setValue} dateFormat="YYYY/MM/DD" validation={true}/>

Properties

| Attribute Name | Mandatory | Value | Description |
| :-----------: |:-----------:| :-----------:| :-----| | applicationMode | no | boolean | The Accessible Date Picker comes with two modes for the screen readers. By default the picker has applicationMode={false}, which means traditional HTML interpretion techniques will be used. But if you want to support desktop-live web like applications passing down the following attribute will make the date picker behave as such. | | validation | yes | boolean | Set to true if you want to make use of the validation check to find errors in entered months, dates or in the number of entered characters. | | dateFormat | yes | "YYYY/MM/DD" "DD-MM-YYYY" "MM.DD.YYYY" "DD/MM/YY" | Enter any string format and separator you wish to use in your input element such as the examples on the left. Please note that /YY formatted years will only work as years in the 2000s. | | theme | no | {customTheme} | You can either use the built in datepicker theme or you can pass in your own custom theme as an object. const customTheme = { palette: { primary: "red", secondary: "blue", tertiary: "green" }, spacing: "0px", "4px", "8px", "16px", "32px", "64px"], }); | | value | yes | {value} | To get started you can define a state for value and setValue and pass it down to the component or pass a value you have created as a prop. Exp: const [value, setValue] = useState(''); | setValue | yes | {setValue} | To get started you can define a state for value and setValue and pass it down to the component or pass a value you have created as a prop. Exp: const [value, setValue] = useState(''); |

You can also find an example usage in the the /demo folder.

Features

The Aria labels will read out each date of the month and will adjust labels according to selection. The icon is screen reader friendly. It will let the user know whether the calendar is open or not and the screen reader will read an error if it occurs.

The date picker has a basic validation check for entered dates. It can point out errors in overflow, date and month.

DatePicker

How to install

You can install the date picker as a npm package by running the following command in your project:

npm i accessible-date-picker

How to contribute

We are always open to contributions and improvements. If you find bugs or know of ways of improving our date picker by extra props, styles, screen reader issues help us out by:

  1. Forking the Accessible Date Pickers repository on github
  2. Clone the repository by running git clone https://github.com/AxessLab/accessible-date-picker.git
  3. Once cloned, open the directory and run npm install.
  4. Change the webpack entry point to: ./demo/index.tsx and output to output: { path: path.resolve(__dirname, "build"), filename: "bundle.js", },
  5. Run npm start to get the development server up and running. Make your changes in the code.
  6. When you're happy, push the code and make a pull request - we will look at it as soon as possible.

Testing and building

  1. To run the unit test run npm test.