Skip to content

Commit 3a96925

Browse files
committed
Readme and package info update
1 parent 5313588 commit 3a96925

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@ Datepicker component for applications based on Facebook React library.
44

55
##Usage
66
Standalone datepicker element. It can perform action if date is selected. Parameters are optional.
7+
For best functionality, *DatePicker* needs to be wrapped in component which sets new date on *onChangeDate* event. An example of such wrapper component could be *DatepickerInput*.
78

89
```
910
var callback = function(date) {
1011
alert('new selected date is: '+date);
1112
}
1213
13-
<Datepicker date={new Date()} onChangeDate={callback} show={true} />
14+
<DatePicker date={new Date()} onChangeDate={callback} show={true} />
1415
```
1516

1617
This library contains own datepicker integration with input element.
1718
All parameters are optional.
18-
Default: date = new Date()
19+
Parameter *beforeUpdate* has to be function which returns string. This string will be set as value of input field before date change.
1920

2021
```
2122
var returnDate = function(date) {return date}; // this callback will be called before input field update. You can use it for example for date formatting as is shown in example/index.html
22-
<DatepickerInput date={new Date()} beforeUpdate={returnDate} />
23+
<DatePickerInput date={new Date()} beforeUpdate={returnDate} />
2324
```
2425

2526
minified javascript and css are located in directory `src/build`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-datepicker",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "",
55
"author": "Michal Biros <[email protected]>",
66
"keywords": [

0 commit comments

Comments
 (0)