0.2.3 • Published 7 years ago

react-simple-month-picker v0.2.3

Weekly downloads
63
License
MIT
Repository
github
Last release
7 years ago

Simple Month-Picker For React

This is a very light component that makes it possible to select a year and a month and automatically sets the day to the first day of the month then it returns the correspondent Javascript Date Object;

Presentation

The component's width is responsive, it takes the width of the parent element. Image of the month picker

Installation

npm install react-simple-month-picker --save

Example :

import React from 'react';
import ReactDOM from 'react-dom';
import MonthPicker from 'react-simple-month-picker';

ReactDOM.render(<MonthPicker onChange={(date)=>{console.log(date);}} />,
  document.getElementById('root')
);

When the user selects a month the value can be retreived by the props function onChange.

Props:

Propis Required ?Description
function : onChangefalseA callback function that is executed on month selection
Array: monthsfalseA JavaScript Array of Strings that must be of length 12, the array represents the months names, by default it's set to "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"

Issues :

For any suggestion you can open in issue here.

Licence :

MIT

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago