Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Commit f136180

Browse files
committed
Adds basic example and doc in the readme
1 parent eea881b commit f136180

File tree

1 file changed

+35
-4
lines changed

1 file changed

+35
-4
lines changed

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,42 @@ react-bootstrap-datetimepicker
33

44
This project is a port of https://github.com/Eonasdan/bootstrap-datetimepicker for React.js
55

6-
Contributions
6+
Usage
77
===============================
8-
There's still plenty of features missing compared to the original date time picker, hence contributions would be highly appreciated.
98

10-
Aknowledgments
9+
Installation :
10+
```
11+
npm install react-bootstrap-datetimepicker
12+
```
13+
14+
Then
15+
```javascript
16+
require('react-bootstrap-datetimepicker');
17+
18+
...
19+
20+
render: function() {
21+
return <DateTimeField />;
22+
}
23+
```
24+
See [Examples](examples/README.md) for more details.
25+
26+
API
1127
===============================
1228

13-
I took https://github.com/stevoland/react-bootstrap as a reference to get the build actually building.
29+
DateTimeField
30+
========
31+
32+
| Name | Type | Default | Description |
33+
| ------------ | ------- | ------- | ----------- |
34+
| **dateTime** | string | "1234567" | Represents the inital dateTime, this string is then parsed by moment.js |
35+
| **format** | string | "X" | Defines the format moment.js should use to parse and output the date to onChange |
36+
| **inputFormat** | string | "MM/DD/YY H:mm A" | Defines the way the date is represented in the HTML input |
37+
| **onChange** | function | x => console.log(x) | Callback trigger when the date changes |
38+
| **showToday** | boolean | true | Highlights today's date |
39+
| **daysOfWeekDisabled** | array of integer | [] | Disables clicking on some days. Goes from 0 (Sunday) to 6 (Saturday). |
40+
41+
42+
Contributions
43+
===============================
44+
There is still plenty of features missing compared to the original date time picker, hence contributions would be highly appreciated.

0 commit comments

Comments
 (0)