diff options
author | Antony Shaleynikov <shaleynikov@gmail.com> | 2017-03-02 15:42:05 +0300 |
---|---|---|
committer | Antony Shaleynikov <shaleynikov@gmail.com> | 2017-03-02 15:42:05 +0300 |
commit | dd2f6abda00cea99ec0a24e3f162fabeba7ac176 (patch) | |
tree | 770b27246656d47c5308894919238238c0dc4d6d /examples/12hours.js | |
parent | dd275f7df354e218d170ddbcc1eadff1427db76b (diff) | |
download | time-picker-dd2f6abda00cea99ec0a24e3f162fabeba7ac176.tar.gz time-picker-dd2f6abda00cea99ec0a24e3f162fabeba7ac176.tar.zst time-picker-dd2f6abda00cea99ec0a24e3f162fabeba7ac176.zip |
Updated 12 hours example, added default format for 12 hours mode, updated tests
Diffstat (limited to 'examples/12hours.js')
-rw-r--r-- | examples/12hours.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/12hours.js b/examples/12hours.js index 18fb626..44e514a 100644 --- a/examples/12hours.js +++ b/examples/12hours.js | |||
@@ -12,7 +12,7 @@ import TimePicker from 'rc-time-picker'; | |||
12 | const showSecond = false; | 12 | const showSecond = false; |
13 | const str = showSecond ? 'HH:mm:ss' : 'HH:mm'; | 13 | const str = showSecond ? 'HH:mm:ss' : 'HH:mm'; |
14 | 14 | ||
15 | const now = moment().hour(14).minute(30); | 15 | const now = moment().hour(0).minute(0); |
16 | 16 | ||
17 | function onChange(value) { | 17 | function onChange(value) { |
18 | console.log(value && value.format(str)); | 18 | console.log(value && value.format(str)); |
@@ -24,7 +24,7 @@ ReactDom.render( | |||
24 | defaultValue={now} | 24 | defaultValue={now} |
25 | className="xxx" | 25 | className="xxx" |
26 | onChange={onChange} | 26 | onChange={onChange} |
27 | show12Hours | 27 | use12Hours |
28 | />, | 28 | />, |
29 | document.getElementById('__react-content') | 29 | document.getElementById('__react-content') |
30 | ); | 30 | ); |