0.1.8 • Published 7 years ago
react-utc-datepicker v0.1.8
React UTC Datepicker
A simple React datepicker component that exclusively uses UTC.
Install
npm install --save react-utc-datepicker
Dependencies
- React >= 16
- MomentJS
- Font Awesome
How to use
import {ReactUTCDatepicker} from 'react-utc-datepicker';formatprop, for formatting date (and time, if necessary); defaults to'YYYY-MM-DD'. Uses Moment formatting.buttonprop, for showing/hiding a button which opens the calendar popup (defaults totrue)buttonPositionprop, possible values arebeforeandafter(defaults toafter)onChangeprop, for tracking the date value
Examples
<ReactUTCDatepicker date={myDate} onChange={value => { console.log(value); }}/><ReactUTCDatepicker date={myDate} button={false} onChange={value => { console.log(value); }}></utc-datepicker/><ReactUTCDatepicker date={myDate} buttonPosition="before" format="MM/DD/YYYY HH:mm:ss" onChange={value => { console.log(value); }}/>