0.0.8 • Published 6 years ago

react-year-month-selector v0.0.8

Weekly downloads
31
License
MIT
Repository
github
Last release
6 years ago

React-Month-Picker-Input

Demo

Live demo: williamluke4.github.io/react-year-month-selector

API

NameTypesDefaultDescription
yearnumbervoidPreselect year in calendar
monthnumber (0..11)voidPreselect month in calendar.
openbooleanfalseState on the dialog
onChangeFunction: (year: number, month: number) => any-onChange callback, receives year and month
onCloseFunction: () => any-onChange callback, called when clicked outside of dialog

Installation

npm install react-year-month-selector --save

Usage

React-Year-Month-Selector provides a dialog which returns the selected Year and Month

import YearMonthSelector from 'react-year-month-selector';
import 'react-year-month-selector/dist/react-year-month-selector.css';

<YearMonthSelector 
  year={2018} 
  month={1} 
  onChange={(year, month)=> console.log(month)} 
  open={this.state.open} 
  onClose={this.handleClose}
/>
0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago