Skip to content

Commit 1d847d8

Browse files
📚 [document] edit readme document.
1 parent d2c3372 commit 1d847d8

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/hour-minute-second.png

11.7 KB
Loading
18 KB
Loading

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ react-mobile-datepicker provides a component that can set year, month and day by
1010
- is only 4k.
1111
- It does not depend on moment.js
1212

13-
## Screenshots
13+
## Theme
14+
1415
### default
1516
<div style="padding:30px">
1617
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/default.png" width="300" />
@@ -34,7 +35,23 @@ react-mobile-datepicker provides a component that can set year, month and day by
3435
### android-dark
3536
<div style="padding:30px">
3637
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/android-dark.png" width="300" />
37-
</div>
38+
</div>
39+
40+
## Custom date unit
41+
42+
set dateFormat for `['YYYY', 'MM', 'DD', 'hh', 'mm']` to configure year, month, day, hour, minute.
43+
44+
<div style="padding:30px">
45+
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/year-month-day-hour-minute.png" width="300" />
46+
</div>
47+
48+
49+
set dateFormat for `['hh', 'mm', 'ss']` to configure hour, minute and second.
50+
51+
<div style="padding:30px">
52+
<img src="https://raw.githubusercontent.com/lanjingling0510/react-mobile-datepicker/master/.github/hour-minute-second.png" width="300" />
53+
</div>
54+
3855

3956
## Getting Started
4057

@@ -109,7 +126,8 @@ ReactDOM.render(<App />, document.getElementById('react-box'));
109126
| isPopup | Boolean | true | whether as popup add a overlay |
110127
| isOpen | Boolean | false | whether to open datepicker |
111128
| theme | String | default | theme of datepicker, include 'default', 'dark', 'ios', 'android', 'android-dark' |
112-
| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day format specified display text. E.g ['YYYY年', 'MM月', 'DD日']|
129+
| dateFormat | Array | ['YYYY', 'M', 'D'] | according to year, month, day, hour, minute, second format specified display text. E.g ['YYYY年', 'MM月', 'DD日']|
130+
|showFormat | String | 'YYYY/MM/DD' | customize the format of the display title |
113131
| value | Date | new Date() | date value |
114132
| min | Date | new Date(1970, 0, 1) | minimum date |
115133
| max | Date | new Date(2050, 0, 1) | maximum date |

examples/basic/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ window.Perf = require('react-addons-perf');
6262
</div>
6363
<DatePicker
6464
dateFormat={['hh', 'mm', 'ss']}
65-
showFormat="hh时:mm分:ss秒"
65+
showFormat="hh:mm:ss"
6666
value={this.state.time}
6767
theme={this.state.theme}
6868
isOpen={this.state.isOpen}

0 commit comments

Comments
 (0)