aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pick-time.html
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pick-time.html')
-rw-r--r--examples/pick-time.html18
1 files changed, 13 insertions, 5 deletions
diff --git a/examples/pick-time.html b/examples/pick-time.html
index 52a60d0..b0115d6 100644
--- a/examples/pick-time.html
+++ b/examples/pick-time.html
@@ -2,7 +2,7 @@
2<html> 2<html>
3 3
4<head> 4<head>
5 <title>pick-time.js - example - rc-time-picker@0.7.1</title> 5 <title>pick-time.js - example - rc-time-picker@1.0.0-alpha1</title>
6 <meta name="viewport" 6 <meta name="viewport"
7 content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> 7 content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
8 <meta charset="utf-8"/> 8 <meta charset="utf-8"/>
@@ -257,7 +257,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
257<body> 257<body>
258<div class="container"> 258<div class="container">
259 <div class="header"> 259 <div class="header">
260 <h1>rc-time-picker@0.7.1</h1> 260 <h1>rc-time-picker@1.0.0-alpha1</h1>
261 261
262 <p>React TimePicker</p> 262 <p>React TimePicker</p>
263 </div> 263 </div>
@@ -276,7 +276,10 @@ import zhCn from <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'
276import TimePicker from <span class="hljs-string">'rc-time-picker'</span>; 276import TimePicker from <span class="hljs-string">'rc-time-picker'</span>;
277import TimePickerLocale from <span class="hljs-string">'rc-time-picker/lib/locale/zh_CN'</span>; 277import TimePickerLocale from <span class="hljs-string">'rc-time-picker/lib/locale/zh_CN'</span>;
278 278
279<span class="hljs-keyword">const</span> formatter = <span class="hljs-keyword">new</span> DateTimeFormat(<span class="hljs-string">'HH:mm:ss'</span>); 279<span class="hljs-keyword">var</span> showSecond = <span class="hljs-literal">true</span>;
280<span class="hljs-keyword">var</span> str = showSecond ? <span class="hljs-string">'HH:mm:ss'</span> : <span class="hljs-string">'HH:mm'</span>;
281
282<span class="hljs-keyword">const</span> formatter = <span class="hljs-keyword">new</span> DateTimeFormat(str);
280 283
281<span class="hljs-keyword">const</span> now = <span class="hljs-keyword">new</span> GregorianCalendar(zhCn); 284<span class="hljs-keyword">const</span> now = <span class="hljs-keyword">new</span> GregorianCalendar(zhCn);
282now.setTime(<span class="hljs-built_in">Date</span>.now()); 285now.setTime(<span class="hljs-built_in">Date</span>.now());
@@ -286,10 +289,15 @@ now.setTime(<span class="hljs-built_in">Date</span>.now());
286} 289}
287 290
288ReactDom.render( 291ReactDom.render(
289 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">TimePicker</span> <span class="hljs-attribute">formatter</span>=<span class="hljs-value">{formatter}</span> <span class="hljs-attribute">locale</span>=<span class="hljs-value">{TimePickerLocale}</span> <span class="hljs-attribute">defaultValue</span>=<span class="hljs-value">{now}</span> <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span>/&gt;</span>, 292 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">TimePicker</span> <span class="hljs-attribute">formatter</span>=<span class="hljs-value">{formatter}</span> <span class="hljs-attribute">locale</span>=<span class="hljs-value">{TimePickerLocale}</span>
293 <span class="hljs-attribute">showSecond</span>=<span class="hljs-value">{showSecond}</span>
294 <span class="hljs-attribute">defaultValue</span>=<span class="hljs-value">{now}</span>
295 <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span>/&gt;</span>,
290 document.getElementById('__react-content') 296 document.getElementById('__react-content')
291); 297);
292</span></code></pre></div> 298
299
300console.log(zhCn);</span></code></pre></div>
293</div> 301</div>
294<a href="http://github.com/react-component/time-picker"> 302<a href="http://github.com/react-component/time-picker">
295 <img style="position: absolute; top: 0; right: 0; border: 0;" 303 <img style="position: absolute; top: 0; right: 0; border: 0;"