Skip to content

Commit

Permalink
improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
mfix22 committed Feb 27, 2019
1 parent ec14835 commit d696347
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ for an **Advanced** example, check out:
| Name | Default | Type | Description |
| :-------------------------- | :------------------------------------------------------------------------------- | :----------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`children`** | `undefined` | `Function` | Render prop component. See [docs below](#render-props) for the options passed |
| `initialDate`, `date` | `new Date()` | `Date`, `String`, `Number`, `Moment` | `initialDate` sets the initial state of `date` for uncontrolled usage, otherwise use `date` for controlled usage |
| `initialDate`, `date` | `new Date()` | `Date`, `String`, `Number`, `Moment` | `initialDate` sets the initial state of `date` for uncontrolled usage, otherwise use `date` for controlled usage. Used as the date to center the calendar around |
| `initialNumDays`, `numDays` | `35` | `Number` | Number of days the calendar should display. If `numDays` > 10, this will be raised to the next multiple of 7. Use `initialNumDays` for uncontrolled usage, `numDays` for controlled |
| `events` | `[]` | `Array<{ date: DateLike }>` | Events passed into the calendar. These objects will be injected into the correct array by date. |
| `weekStartsOn` | `0` | `Number[0-6]` | Weekday to start the week on. Sunday (0) - Saturday (6). |
| `headers` | `['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']` | `String[]` | Replace the headers that get passed to `children`, for convience. |
| `events` | `[]` | `Array<{ date: DateLike }>` | Events passed into the calendar. These objects will be injected into the correct array by date |
| `weekStartsOn` | `0` | `Number[0-6]` | Weekday to start the week on. Sunday (0) - Saturday (6) |
| `headers` | `['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']` | `String[]` | Replace the headers that get passed to `children`, for convience |
| `render` | `undefined` | `Function` | Optional, same as `children` |

**Note**: the `Calendarx` days grid will adapt depending on the number of days that are specified
Expand All @@ -85,7 +85,7 @@ The following will be passed to your `props.children` or `props.render` function

| Option | Type | Description |
| :---------- | :-------------------------------------------------------------- | :--------------------------------------------------------------------------------- |
| `days` | `Day[][]` | 2-dimentional grid of objects representing each calendar day |
| `days` | `Day[][]` | 2-dimensional grid of objects representing each calendar day |
| `date` | `Date` | Current `date` state |
| `view` | `String{'year','month','week','day'}` | View according to `numDays`. `day` if <=4, `week` if <= 10, month < 365, or `year` |
| `jump` | `Function(n: Number, units: {'years','months','weeks','days'})` | Function to jump a specific amount of time |
Expand Down

0 comments on commit d696347

Please sign in to comment.