Package Exports
- react-datetime/DateTime
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-datetime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-datetime
This project is a port of https://github.com/Eonasdan/bootstrap-datetimepicker for React.js
Usage
Installation :
npm install react-datetimeThen
require('react-datetime');
...
render: function() {
return <Datetime />;
}See Examples for more details.
API
| Name | Type | Default | Description |
|---|---|---|---|
| date | Date | new Date() | Represents the inital dateTime, this string is then parsed by moment.js |
| dateFormat | string | "MM/DD/YY" | Defines the format moment.js should use to parse and output the date. The default is only set if there is not timeFormat defined. |
| timeFormat | string | "MM/DD/YY" | Defines the format moment.js should use to parse and output the time. The default is only set if there is not dateFormat defined. |
| onChange | function | x => console.log(x) | Callback trigger when the date changes |
| viewMode | string or number | 'days' | The default view to display when the picker is shown. ('years', 'months', 'days', 'time') |
| inputProps | object | undefined | Defines additional attributes for the input element of the component. |
| minDate | moment | undefined | The earliest date allowed for entry in the calendar view. |
| maxDate | moment | undefined | The latest date allowed for entry in the calendar view. |
Contributions
Any help is always welcome :)