aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pick-time.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pick-time.js')
-rw-r--r--examples/pick-time.js6
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');
15const now = new GregorianCalendar(zhCn); 15const now = new GregorianCalendar(zhCn);
16now.setTime(Date.now()); 16now.setTime(Date.now());
17 17
18function onChange(v) {
19 console.log(v && formatter.format(v));
20}
21
18ReactDom.render( 22ReactDom.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);