aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pick-time.html
diff options
context:
space:
mode:
authoryiminghe <yiminghe@gmail.com>2015-12-21 17:14:48 +0800
committeryiminghe <yiminghe@gmail.com>2015-12-21 17:14:48 +0800
commit89b84f104138888b074334e76bc1dc7002f2d061 (patch)
tree052a86cd9c38588dc9bdfe675baf25f27798e90b /examples/pick-time.html
parent70e9ca03bb946357ea1fc7edba8d9e3b31e0d5ca (diff)
downloadtime-picker-89b84f104138888b074334e76bc1dc7002f2d061.tar.gz
time-picker-89b84f104138888b074334e76bc1dc7002f2d061.tar.zst
time-picker-89b84f104138888b074334e76bc1dc7002f2d061.zip
Updates
Diffstat (limited to 'examples/pick-time.html')
-rw-r--r--examples/pick-time.html25
1 files changed, 13 insertions, 12 deletions
diff --git a/examples/pick-time.html b/examples/pick-time.html
index bb2ae7e..fd617de 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@1.0.0-alpha5</title> 5 <title>pick-time.js - example - rc-time-picker@1.0.0</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@1.0.0-alpha5</h1> 260 <h1>rc-time-picker@1.0.0</h1>
261 261
262 <p>React TimePicker</p> 262 <p>React TimePicker</p>
263 </div> 263 </div>
@@ -266,17 +266,17 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
266 <script src="pick-time.js?nowrap"></script> 266 <script src="pick-time.js?nowrap"></script>
267 <div class="highlight"><pre><code language="js"><span class="hljs-comment">/* eslint no-console:0 */</span> 267 <div class="highlight"><pre><code language="js"><span class="hljs-comment">/* eslint no-console:0 */</span>
268 268
269<span class="hljs-keyword">import</span> <span class="hljs-string">'rc-time-picker/assets/index.css'</span>; 269import <span class="hljs-string">'rc-time-picker/assets/index.css'</span>;
270 270
271<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>; 271import React from <span class="hljs-string">'react'</span>;
272<span class="hljs-keyword">import</span> ReactDom <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom'</span>; 272import ReactDom from <span class="hljs-string">'react-dom'</span>;
273 273
274<span class="hljs-keyword">import</span> GregorianCalendar <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar'</span>; 274import GregorianCalendar from <span class="hljs-string">'gregorian-calendar'</span>;
275<span class="hljs-keyword">import</span> DateTimeFormat <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar-format'</span>; 275import DateTimeFormat from <span class="hljs-string">'gregorian-calendar-format'</span>;
276<span class="hljs-keyword">import</span> zhCn <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'</span>; 276import zhCn from <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'</span>;
277 277
278<span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>; 278import TimePicker from <span class="hljs-string">'rc-time-picker'</span>;
279<span class="hljs-keyword">import</span> TimePickerLocale <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker/lib/locale/zh_CN'</span>; 279import TimePickerLocale from <span class="hljs-string">'rc-time-picker/lib/locale/zh_CN'</span>;
280 280
281<span class="hljs-keyword">const</span> showSecond = <span class="hljs-literal">true</span>; 281<span class="hljs-keyword">const</span> showSecond = <span class="hljs-literal">true</span>;
282<span class="hljs-keyword">const</span> str = showSecond ? <span class="hljs-string">'HH:mm:ss'</span> : <span class="hljs-string">'HH:mm'</span>; 282<span class="hljs-keyword">const</span> str = showSecond ? <span class="hljs-string">'HH:mm:ss'</span> : <span class="hljs-string">'HH:mm'</span>;
@@ -286,16 +286,17 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
286<span class="hljs-keyword">const</span> now = <span class="hljs-keyword">new</span> GregorianCalendar(zhCn); 286<span class="hljs-keyword">const</span> now = <span class="hljs-keyword">new</span> GregorianCalendar(zhCn);
287now.setTime(<span class="hljs-built_in">Date</span>.now()); 287now.setTime(<span class="hljs-built_in">Date</span>.now());
288 288
289<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">onChange</span>(<span class="hljs-params">value</span>) </span>{ 289<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">onChange</span><span class="hljs-params">(value)</span> </span>{
290 <span class="hljs-built_in">console</span>.log(value &amp;&amp; formatter.format(value)); 290 <span class="hljs-built_in">console</span>.log(value &amp;&amp; formatter.format(value));
291} 291}
292 292
293ReactDom.render( 293ReactDom.render(
294 <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> 294 <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>
295 <span class="hljs-attribute">style</span>=<span class="hljs-value">{{width:</span> <span class="hljs-attribute">100</span>}}
295 <span class="hljs-attribute">showSecond</span>=<span class="hljs-value">{showSecond}</span> 296 <span class="hljs-attribute">showSecond</span>=<span class="hljs-value">{showSecond}</span>
296 <span class="hljs-attribute">defaultValue</span>=<span class="hljs-value">{now}</span> 297 <span class="hljs-attribute">defaultValue</span>=<span class="hljs-value">{now}</span>
297 <span class="hljs-attribute">className</span>=<span class="hljs-value">"xxx"</span> 298 <span class="hljs-attribute">className</span>=<span class="hljs-value">"xxx"</span>
298 <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span>/&gt;</span>, 299 <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span> /&gt;</span>,
299 document.getElementById('__react-content') 300 document.getElementById('__react-content')
300); 301);
301</span></code></pre></div> 302</span></code></pre></div>