Skip to content

Commit 8937a76

Browse files
committed
Update README.md
added usage
1 parent 8c363a9 commit 8937a76

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
react-datepicker
2-
================
1+
#react-datepicker
32

4-
Datepicker component for application using Facebook React
3+
Datepicker component for applications based on Facebook React library.
4+
5+
##Usage
6+
Standalone datepicker element. It can perform action if date is selected. Parameters are optional.
7+
8+
```
9+
var callback = function(date) {
10+
alert('new selected date is: '+date);
11+
}
12+
13+
<Datepicker date={new Date()} onChangeDate={callback} show={true} />
14+
```
15+
16+
This library contains own datepicker integration with input element.
17+
All parameters are optional.
18+
Default: date = new Date()
19+
```
20+
<DatepickerInput date={new Date()} />
21+
```

0 commit comments

Comments
 (0)