aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pick-time.jsx
diff options
context:
space:
mode:
authorMG12 <wuzhao.mail@gmail.com>2015-11-16 14:44:26 +0800
committerMG12 <wuzhao.mail@gmail.com>2015-11-16 14:44:26 +0800
commit78637ac02ce6a469d2021736d3cb12e98c5edbe7 (patch)
tree68de02afaa15b90be1fcc1dd191edb6f48ebb293 /examples/pick-time.jsx
parent02de449a0474765a4796fa607e7e3922252f574f (diff)
downloadtime-picker-0.2.0.tar.gz
time-picker-0.2.0.tar.zst
time-picker-0.2.0.zip
remove toggle feature because rc-trigger included; update example and document0.2.0
Diffstat (limited to 'examples/pick-time.jsx')
-rw-r--r--examples/pick-time.jsx36
1 files changed, 0 insertions, 36 deletions
diff --git a/examples/pick-time.jsx b/examples/pick-time.jsx
deleted file mode 100644
index 33c5d07..0000000
--- a/examples/pick-time.jsx
+++ /dev/null
@@ -1,36 +0,0 @@
1import '../component/timepicker/assets/index.less';
2
3import React from 'react';
4import ReactDom from 'react-dom';
5import zhCn from 'gregorian-calendar/lib/locale/zh_CN';
6import GregorianCalendar from 'gregorian-calendar';
7
8import TimePicker from '../component/timepicker/src/Picker';
9import TimePanel from '../component/timepicker/src/TimePanel';
10import TimepickerLocale from '../component/timepicker/src/locale/zh_CN';
11import DateTimeFormat from 'gregorian-calendar-format';
12
13const formatter = new DateTimeFormat('HH:mm:ss');
14
15const now = new GregorianCalendar(zhCn);
16now.setTime(Date.now());
17
18const timePanel = (
19 <TimePanel
20 defaultValue={now}
21 locale={TimepickerLocale}
22 formatter={formatter}
23 minuteOptions={[0, 30]}
24 />
25);
26
27ReactDom.render(
28 <TimePicker panel={timePanel} value={now}>
29 {
30 ({value}) => {
31 return <input type="text" placeholder="请选择时间" readOnly value={value && formatter.format(value)} />;
32 }
33 }
34 </TimePicker>,
35 document.getElementById('react-content')
36);