diff options
Diffstat (limited to 'examples/pick-time.html')
-rw-r--r-- | examples/pick-time.html | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/examples/pick-time.html b/examples/pick-time.html index 1cbbb2c..ed16427 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-alpha2</title> | 5 | <title>pick-time.js - example - rc-time-picker@1.0.0-alpha3</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"/> |
@@ -251,13 +251,13 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic | |||
251 | <!--[if lt IE 9]> | 251 | <!--[if lt IE 9]> |
252 | <script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script> | 252 | <script src="https://a.alipayobjects.com/??es5-shim/4.0.5/es5-shim.js,es5-shim/4.0.5/es5-sham.js,html5shiv/3.7.2/src/html5shiv.js"></script> |
253 | <![endif]--> | 253 | <![endif]--> |
254 | <link rel="stylesheet" href="pick-time.css" /> | 254 | <link rel="stylesheet" href="common.css" /> |
255 | </head> | 255 | </head> |
256 | 256 | ||
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-alpha2</h1> | 260 | <h1>rc-time-picker@1.0.0-alpha3</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 | import <span class="hljs-string">'rc-time-picker/assets/index.css'</span>; | 269 | <span class="hljs-keyword">import</span> <span class="hljs-string">'rc-time-picker/assets/index.css'</span>; |
270 | 270 | ||
271 | import React from <span class="hljs-string">'react'</span>; | 271 | <span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>; |
272 | import ReactDom from <span class="hljs-string">'react-dom'</span>; | 272 | <span class="hljs-keyword">import</span> ReactDom <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom'</span>; |
273 | 273 | ||
274 | import GregorianCalendar from <span class="hljs-string">'gregorian-calendar'</span>; | 274 | <span class="hljs-keyword">import</span> GregorianCalendar <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar'</span>; |
275 | import DateTimeFormat from <span class="hljs-string">'gregorian-calendar-format'</span>; | 275 | <span class="hljs-keyword">import</span> DateTimeFormat <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar-format'</span>; |
276 | import zhCn from <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'</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>; |
277 | 277 | ||
278 | import TimePicker from <span class="hljs-string">'rc-time-picker'</span>; | 278 | <span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>; |
279 | import TimePickerLocale from <span class="hljs-string">'rc-time-picker/lib/locale/zh_CN'</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>; |
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,7 +286,7 @@ import TimePickerLocale from <span class="hljs-string">'rc-time-picker/lib/local | |||
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); |
287 | now.setTime(<span class="hljs-built_in">Date</span>.now()); | 287 | now.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 && formatter.format(value)); | 290 | <span class="hljs-built_in">console</span>.log(value && formatter.format(value)); |
291 | } | 291 | } |
292 | 292 | ||
@@ -294,6 +294,7 @@ ReactDom.render( | |||
294 | <span class="xml"><span class="hljs-tag"><<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"><<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">showSecond</span>=<span class="hljs-value">{showSecond}</span> | 295 | <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> | 296 | <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> | ||
297 | <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span>/></span>, | 298 | <span class="hljs-attribute">onChange</span>=<span class="hljs-value">{onChange}</span>/></span>, |
298 | document.getElementById('__react-content') | 299 | document.getElementById('__react-content') |
299 | ); | 300 | ); |