diff options
author | yiminghe <yiminghe@gmail.com> | 2015-11-19 19:57:17 +0800 |
---|---|---|
committer | yiminghe <yiminghe@gmail.com> | 2015-11-19 19:57:17 +0800 |
commit | 9f9f39e4fb8073f6f31d545c746e4c3b7ad651da (patch) | |
tree | a147168a4caf5ff263a6ab339d3ab6f140ee06da /examples/pick-time.js | |
parent | 11b97949da16fc090400a753189baf10f29c111f (diff) | |
download | time-picker-9f9f39e4fb8073f6f31d545c746e4c3b7ad651da.tar.gz time-picker-9f9f39e4fb8073f6f31d545c746e4c3b7ad651da.tar.zst time-picker-9f9f39e4fb8073f6f31d545c746e4c3b7ad651da.zip |
fix value0.6.0
Diffstat (limited to 'examples/pick-time.js')
-rw-r--r-- | examples/pick-time.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/pick-time.js b/examples/pick-time.js index 0a54279..d5e3715 100644 --- a/examples/pick-time.js +++ b/examples/pick-time.js | |||
@@ -15,7 +15,11 @@ const formatter = new DateTimeFormat('HH:mm:ss'); | |||
15 | const now = new GregorianCalendar(zhCn); | 15 | const now = new GregorianCalendar(zhCn); |
16 | now.setTime(Date.now()); | 16 | now.setTime(Date.now()); |
17 | 17 | ||
18 | function onChange(v) { | ||
19 | console.log(v && formatter.format(v)); | ||
20 | } | ||
21 | |||
18 | ReactDom.render( | 22 | ReactDom.render( |
19 | <TimePicker formatter={formatter} locale={TimePickerLocale} defaultValue={now} />, | 23 | <TimePicker formatter={formatter} locale={TimePickerLocale} defaultValue={now} onChange={onChange}/>, |
20 | document.getElementById('__react-content') | 24 | document.getElementById('__react-content') |
21 | ); | 25 | ); |