Skip to content

Commit

Permalink
Update API docs to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
gpbl committed May 15, 2016
1 parent 5ea329e commit 6dad40b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 167 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Look at [some examples](http://gpbl.org/react-day-picker/examples) showing all i

* [Examples with code](http://gpbl.org/react-day-picker/examples)
* [Documentation](http://gpbl.org/react-day-picker)
* [Getting started](http://gpbl.org/react-day-picker/docs/GettingStarted.html)
* [Basic usage](http://gpbl.org/react-day-picker/docs/Basic.html)
* [Use of modifiers](http://gpbl.org/react-day-picker/docs/Modifiers.html)
* [API](http://www.gpbl.org/react-day-picker/docs/API.html)
* [Styling](http://www.gpbl.org/react-day-picker/docs/Styling.html)
* [Localization](http://www.gpbl.org/react-day-picker/docs/Localization.html)
Expand Down Expand Up @@ -61,7 +62,7 @@ function isSunday(day) {
}

function MyComponent() {
return <DayPicker initialMonth={ new Date(2016, 1) } disabledDays={{ isSunday }} />
return <DayPicker initialMonth={ new Date(2016, 1) } disabledDays={ isSunday } />
}
```

Expand Down
46 changes: 24 additions & 22 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@

## Props quick reference

| Prop | Type |
| --- | --- |
| [canChangeMonth](APIProps.md#canchangemonth-boolean) | Boolean |
| [captionElement](APIProps.md#captionelement-element) | Element |
| [enableOutsideDays](APIProps.md#enableoutsidedays-boolean) | Boolean |
| [fromMonth](APIProps.md#frommonth-date) | Date |
| [initialMonth](APIProps.md#initialmonth-date) | Date |
| [locale](APIProps.md#locale-string) | String |
| [localeUtils](APIProps.md#localeutils-object) | Object |
| [modifiers](APIProps.md#modifiers-object) | Object |
| [numberOfMonths](APIProps.md#numberofmonths-number) | Number |
| [onCaptionClick](APIProps.md#oncaptionclick-function) | Function |
| [onDayClick](APIProps.md#ondayclick-function) | Function |
| [onDayMouseEnter](APIProps.md#ondaymouseenter-function) | Function |
| [onDayMouseLeave](APIProps.md#ondaymouseleave-function) | Function |
| [onDayTouchStart](APIProps.md#ondaytouchstart-function) | Function |
| [onDayTouchEnd](APIProps.md#ondaytouchend-function) | Function |
| [onMonthChange](APIProps.md#onmonthchange-function) | Function |
| [renderDay](APIProps.md#renderday-function) | Function |
| [reverseMonths](APIProps.md#reversemonths-boolean) | Boolean |
| [tabIndex](APIProps.md#tabindex-number) | Number |
| [toMonth](APIProps.md#tomonth-date) | Date |
| Prop | Default | Type |
| --- | --- | --- |
| [canChangeMonth](APIProps.md#canchangemonth) | true | `Bool` |
| [captionElement](APIProps.md#captionelement) | | `Element` |
| [disabledDays](APIProps.md#disableddays) | | `Bool` |
| [enableOutsideDays](APIProps.md#enableoutsidedays) | false | `Bool` |
| [fromMonth](APIProps.md#frommonth) | | `Date` |
| [initialMonth](APIProps.md#initialmonth) | Current month | `Date` |
| [locale](APIProps.md#locale) | en | `String` |
| [localeUtils](APIProps.md#localeutils) | | `Object` |
| [modifiers](APIProps.md#modifiers) | | `Object` |
| [numberOfMonths](APIProps.md#numberofmonths) | 1 | `Number` |
| [onCaptionClick](APIProps.md#oncaptionclick) | | `(e: SyntethicEvent, currentMonth: Date) ⇒ void` |
| [onDayClick](APIProps.md#ondayclick) | | `(e: SyntethicEvent, day: Date, modifiers: Object) ⇒ void` |
| [onDayMouseEnter](APIProps.md#ondaymouseenter) | | `(e: SyntethicEvent, day: Date, modifiers: Object) ⇒ void` |
| [onDayMouseLeave](APIProps.md#ondaymouseleave) | | `(e: SyntethicEvent, day: Date, modifiers: Object) ⇒ void` |
| [onDayTouchStart](APIProps.md#ondaytouchstart) | | `(e: SyntethicEvent, day: Date, modifiers: Object) ⇒ void` |
| [onDayTouchEnd](APIProps.md#ondaytouchend) | | `(e: SyntethicEvent, day: Date, modifiers: Object) ⇒ void` |
| [onMonthChange](APIProps.md#onmonthchange) | | `(month: Date) ⇒ void` |
| [renderDay](APIProps.md#renderday) | day ⇒ day.getDate() | `(day: Date) ⇒ Element` |
| [reverseMonths](APIProps.md#reversemonths) | false | `Bool` |
| [selectedDays](APIProps.md#selecteddays) | | `Bool` |
| [tabIndex](APIProps.md#tabindex) | | `Number` |
| [toMonth](APIProps.md#tomonth) | | `Date` |
10 changes: 5 additions & 5 deletions docs/APIMethods.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Component methods

#### showMonth(d: Date)
#### showMonth `(d: Date) ⇒ void`

Set the day picker to display the given month.

Expand All @@ -25,24 +25,24 @@ class MyComponent extends React {

---

#### showPreviousMonth()
#### showPreviousMonth `() ⇒ void`

Set the day picker to display the previous month.

---

#### showNextMonth()
#### showNextMonth `() ⇒ void`

Set the day picker to display the next month.

---

#### showPreviousYear()
#### showPreviousYear `() ⇒ void`

Set the day picker to display the previous year.

---

#### showNextYear()
#### showNextYear `() ⇒ void`

Set the day picker to display the next year.
Loading

0 comments on commit 6dad40b

Please sign in to comment.