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

react-combo-date-picker

v1.0.1

Published

A React component to select dates using combo boxes

Downloads

19

Readme

reactComboDatePicker

Select dates with combo boxes

reactComboDatePicker is an React component to select dates using combo boxes.

See the live demos and read the docs

Note that this project is a fork ngComboDatePicker, an Angular implementation of this component.

Usage

In order to use this component:

1) Include the library (located in the dist folder) in the header of your HTML files, after including React:

<script type="text/javascript" src="react.min.js"></script>
<script type="text/javascript" src="react-dom.min.js"></script>
<script type="text/javascript" src="reactComboDatePicker.min.js"></script>

2) Then use the component ComboDatePicker in your code:

ReactDOM.render(
    <ComboDatePicker />,
    document.getElementById('root')
);

Attributes

The reactComboDatePicker component supports the following attributes:

Name | Description ------------- | ---- date | A Date object, a string or a number representing the initial date of the picker. minDate | A Date object, a string or a number representing the minimum date that can be picked. By default the minimum date is 100 years before the current day. maxDate | A Date object, a string or a number representing the maximum date that can be picked. By default the maximum date is the current day. months | A string (comma separated) or an array with the names of the twelve months. order | A string with the characters "d", "m" and "y" indicating in which order the combo boxes must be displayed. By default, the combo boxes are displayed in the order "dmy". attrsDate | An object with HTML attributes to add to the select element for the date. attrsMonth | An object with HTML attributes to add to the select element for the month. attrsYear | An object with HTML attributes to add to the select element for the year. yearOrder | A string indicating if the years must be sorted in "ascending" or "descending" order. timezone | A number indicating timezone to be used when converting a string or an integer to a date. By default the timezone of the client is used. placeholder | A string (comma separated) or an array with the placeholders for the year, month and date combo boxes (in that order). onChange | A callback function invoked each time that the date, represented by the pickers, changes.

Compilation

Since the project uses JSX and ES6, you should use Babel to recompile the file reactComboDatePicker.js (from the source folder) every time you modify it, using the command: babel source --out-dir dist

License

reactComboDatePicker is free software; you can redistribute it and/or modify it under the terms of the Mozilla Public License v2.0. You should have received a copy of the MPL 2.0 along with this library, otherwise you can obtain one at http://mozilla.org/MPL/2.0/.