react-dateify
v1.0.0
Published
A boring, plain, simple ReactJS datepicker component for the date
Downloads
1
Readme
ReactJS Datepicker
Install
$ npm i react-dateify
Usage
import React from 'react'
import ReactDom from 'react-dom'
import DatePicker from 'react-dateify'
let date = new Date(),
onChange = (moment) => {
console.log('onChange -> moment.toDate()', moment.toDate());
}
ReactDOM.render(
<DatePicker date={date} onChange={onChange}/>,
document.getElementById('app')
);
date prop must be a Date object
onChange prop must be a function
Available props
| Prop | Type | Default | Description | |-------------------------------|-----------------|-------------------------|------------------------------------------| | date | Date | | Date object representing the value of the date picker|
Events
| Name | Parameter | Description |
|-------------------------------|-----------------|------------------------------------------|
| onChange | Object | Callable function that can be passed into component which returns as a moment
object |
Issues
File any issues here https://github.com/klye-g/react-dateify/issues