Skip to content

Commit

Permalink
📚 [document] edit readme document.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanjingling0510 committed Jul 8, 2017
1 parent d2c3372 commit 1d847d8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
Binary file added .github/hour-minute-second.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/year-month-day-hour-minute.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ react-mobile-datepicker provides a component that can set year, month and day by
- is only 4k.
- It does not depend on moment.js

## Screenshots
## Theme

### default
<div style="padding:30px">
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/default.png" width="300" />
Expand All @@ -34,7 +35,23 @@ react-mobile-datepicker provides a component that can set year, month and day by
### android-dark
<div style="padding:30px">
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/android-dark.png" width="300" />
</div>
</div>

## Custom date unit

set dateFormat for `['YYYY', 'MM', 'DD', 'hh', 'mm']` to configure year, month, day, hour, minute.

<div style="padding:30px">
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/year-month-day-hour-minute.png" width="300" />
</div>


set dateFormat for `['hh', 'mm', 'ss']` to configure hour, minute and second.

<div style="padding:30px">
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/hour-minute-second.png" width="300" />
</div>


## Getting Started

Expand Down Expand Up @@ -109,7 +126,8 @@ ReactDOM.render(<App />, document.getElementById('react-box'));
| isPopup | Boolean | true | whether as popup add a overlay |
| isOpen | Boolean | false | whether to open datepicker |
| theme | String | default | theme of datepicker, include 'default', 'dark', 'ios', 'android', 'android-dark' |
| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day format specified display text. E.g ['YYYY年', 'MM月', 'DD日']|
| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day, hour, minute, second format specified display text. E.g ['YYYY年', 'MM月', 'DD日']|
|showFormat | String | 'YYYY/MM/DD' | customize the format of the display title |
| value | Date | new Date() | date value |
| min | Date | new Date(1970, 0, 1) | minimum date |
| max | Date | new Date(2050, 0, 1) | maximum date |
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ window.Perf = require('react-addons-perf');
</div>
<DatePicker
dateFormat={['hh', 'mm', 'ss']}
showFormat="hh时:mm分:ss秒"
showFormat="hh:mm:ss"
value={this.state.time}
theme={this.state.theme}
isOpen={this.state.isOpen}
Expand Down

0 comments on commit 1d847d8

Please sign in to comment.