yet-another-datetime-picker
React datetime picker powered by momentjs
Design from https://dribbble.com/shots/1439965-Due-Date-and-Time-Picker
Icons from ionicons
Demo
Usage
<DatetimePickermoment=thisstatemomentrange=start: thisstatestartRange // optionalend: thisstateendRange // optionalonChange=thishandleChangeonDone=thishandleDonetheme=colorPrimary="#1385e5" // defaultcolorSecondary="#e77213" // defaultcolorGray="#999999" // defaultcolorError="#e71313" // defaulticonPrevMonth="ion-ios-arrow-left" // defaulticonNextMonth="ion-ios-arrow-right" // defaulticonDone: 'ion-checkmark' // defaulticonDate: 'ion-calendar' // defaulticonTime: 'ion-clock' // defaulttype="datetime" // default, other values are "date" or "type"/>
Check app.js for a working example.
moment-input with the following changes
This repo is forked from- Specify type="time" or type="date" to have a date-only or time-only input.
- Theming support allows customization of colors and icons.
- Buttons to move forward or backwards between years.
- Fixed package / build issues.
- Date range added which highlights the days in the range specified
Installation
npm i yet-another-datetime-picker --save
Notice: This module requires moment as a peerDependency.
Development
- npm install
- npm start
- http://localhost:8888/example
License
ISC