react-ymd-date-select

Hooks and components for Y-M-D dropdowns with React

MIT License

Downloads
2.5K
Stars
45
Committers
3

react-ymd-date-select

Hooks and components for Y-M-D dropdowns with React. Demo

The Y-M-D dropdown UI is sometimes preferable to calendar widgets, e.g. birth date selection.

Building Y-M-D looks simple, but actually, there are some nuts;

  • Generating the arrays of year, month, and day numbers and strings.
  • Validating combinations of the Y-M-D values.
  • Combining the 3 values from the dropdowns into one date value, and integrating it with the form component state.

This library manages these things.

Installation

With npm:

npm install react-ymd-date-select

With Yarn:

yarn add react-ymd-date-select

API & Samples

Please see the demo page for the guide and samples.

Support the project

Package Rankings
Top 6.36% on Npmjs.org
Badges
Extracted from project README
Test and Build GitHub Sponsors