aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/pick-time.html
diff options
context:
space:
mode:
author崖鹰 <zhao.wuz@alipay.com>2015-11-20 14:02:24 +0800
committer崖鹰 <zhao.wuz@alipay.com>2015-11-20 14:02:24 +0800
commit037a4a19d7dbaa4c73dfca4ff632f988c002d49e (patch)
treef9d02b53b266d645f30bc942dcb62486b78d792b /examples/pick-time.html
parenta325f5f7113ed7720542cf585024942f7edeb018 (diff)
downloadtime-picker-037a4a19d7dbaa4c73dfca4ff632f988c002d49e.tar.gz
time-picker-037a4a19d7dbaa4c73dfca4ff632f988c002d49e.tar.zst
time-picker-037a4a19d7dbaa4c73dfca4ff632f988c002d49e.zip
Updates
Diffstat (limited to 'examples/pick-time.html')
-rw-r--r--examples/pick-time.html22
1 files changed, 11 insertions, 11 deletions
diff --git a/examples/pick-time.html b/examples/pick-time.html
index 9d81c49..6f4b1f8 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.6.0</title> 5 <title>pick-time.js - example - rc-time-picker@0.7.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,31 +257,31 @@ 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.6.0</h1> 260 <h1>rc-time-picker@0.7.0</h1>
261 261
262 <p>React TimePicker</p> 262 <p>React TimePicker</p>
263 </div> 263 </div>
264 <div class="example" id="__react-content"></div> 264 <div class="example" id="__react-content"></div>
265 <script src="common.js?nowrap"></script> 265 <script src="common.js?nowrap"></script>
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-keyword">import</span> <span class="hljs-string">'rc-time-picker/assets/index.css'</span>; 267 <div class="highlight"><pre><code language="js">import <span class="hljs-string">'rc-time-picker/assets/index.css'</span>;
268 268
269<span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>; 269import React from <span class="hljs-string">'react'</span>;
270<span class="hljs-keyword">import</span> ReactDom <span class="hljs-keyword">from</span> <span class="hljs-string">'react-dom'</span>; 270import ReactDom from <span class="hljs-string">'react-dom'</span>;
271 271
272<span class="hljs-keyword">import</span> GregorianCalendar <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar'</span>; 272import GregorianCalendar from <span class="hljs-string">'gregorian-calendar'</span>;
273<span class="hljs-keyword">import</span> DateTimeFormat <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar-format'</span>; 273import DateTimeFormat from <span class="hljs-string">'gregorian-calendar-format'</span>;
274<span class="hljs-keyword">import</span> zhCn <span class="hljs-keyword">from</span> <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'</span>; 274import zhCn from <span class="hljs-string">'gregorian-calendar/lib/locale/zh_CN'</span>;
275 275
276<span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>; 276import TimePicker from <span class="hljs-string">'rc-time-picker'</span>;
277<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>; 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">const</span> formatter = <span class="hljs-keyword">new</span> DateTimeFormat(<span class="hljs-string">'HH:mm:ss'</span>);
280 280
281<span class="hljs-keyword">const</span> now = <span class="hljs-keyword">new</span> GregorianCalendar(zhCn); 281<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()); 282now.setTime(<span class="hljs-built_in">Date</span>.now());
283 283
284<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">onChange</span>(<span class="hljs-params">v</span>) </span>{ 284<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">onChange</span><span class="hljs-params">(v)</span> </span>{
285 <span class="hljs-built_in">console</span>.log(v &amp;&amp; formatter.format(v)); 285 <span class="hljs-built_in">console</span>.log(v &amp;&amp; formatter.format(v));
286} 286}
287 287