diff options
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 | ); |