aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/value-and-defaultValue.html
diff options
context:
space:
mode:
authorafc163 <afc163@gmail.com>2017-04-14 17:22:58 +0800
committerafc163 <afc163@gmail.com>2017-04-14 17:22:58 +0800
commit5b1086548164afd65cf4a5cbb7ec1f92cd5e2b9e (patch)
treed5c8b096944cd0648b04983cdf0630ade3a94151 /examples/value-and-defaultValue.html
parentbc74c14f3cb8ea2d2b242563dbe9963b6491ade4 (diff)
downloadtime-picker-5b1086548164afd65cf4a5cbb7ec1f92cd5e2b9e.tar.gz
time-picker-5b1086548164afd65cf4a5cbb7ec1f92cd5e2b9e.tar.zst
time-picker-5b1086548164afd65cf4a5cbb7ec1f92cd5e2b9e.zip
Updates
Diffstat (limited to 'examples/value-and-defaultValue.html')
-rw-r--r--examples/value-and-defaultValue.html26
1 files changed, 12 insertions, 14 deletions
diff --git a/examples/value-and-defaultValue.html b/examples/value-and-defaultValue.html
index ea2541e..88ab274 100644
--- a/examples/value-and-defaultValue.html
+++ b/examples/value-and-defaultValue.html
@@ -2,7 +2,7 @@
2<html> 2<html>
3 3
4<head> 4<head>
5 <title>value-and-defaultValue.js - example - rc-time-picker@2.3.3</title> 5 <title>value-and-defaultValue.js - example - rc-time-picker@2.3.4</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"/>
@@ -263,7 +263,7 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
263<body> 263<body>
264 <div class="container"> 264 <div class="container">
265 <div class="header"> 265 <div class="header">
266 <h1>rc-time-picker@2.3.3</h1> 266 <h1>rc-time-picker@2.3.4</h1>
267 267
268 <p>React TimePicker</p> 268 <p>React TimePicker</p>
269 </div> 269 </div>
@@ -278,21 +278,19 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
278<span class="hljs-keyword">import</span> moment <span class="hljs-keyword">from</span> <span class="hljs-string">'moment'</span>; 278<span class="hljs-keyword">import</span> moment <span class="hljs-keyword">from</span> <span class="hljs-string">'moment'</span>;
279<span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>; 279<span class="hljs-keyword">import</span> TimePicker <span class="hljs-keyword">from</span> <span class="hljs-string">'rc-time-picker'</span>;
280 280
281<span class="hljs-keyword">const</span> App = React.createClass({ 281<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">App</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">React</span>.<span class="hljs-title">Component</span> </span>{
282 getInitialState() { 282 state = {
283 <span class="hljs-keyword">return</span> { 283 value: moment(),
284 value: moment(), 284 };
285 }; 285 handleValueChange = (value) =&gt; {
286 },
287 handleValueChange(value) {
288 <span class="hljs-built_in">console</span>.log(value &amp;&amp; value.format(<span class="hljs-string">'HH:mm:ss'</span>)); 286 <span class="hljs-built_in">console</span>.log(value &amp;&amp; value.format(<span class="hljs-string">'HH:mm:ss'</span>));
289 <span class="hljs-keyword">this</span>.setState({ value }); 287 <span class="hljs-keyword">this</span>.setState({ value });
290 }, 288 }
291 clear() { 289 clear = () =&gt; {
292 <span class="hljs-keyword">this</span>.setState({ 290 <span class="hljs-keyword">this</span>.setState({
293 value: <span class="hljs-literal">undefined</span>, 291 value: <span class="hljs-literal">undefined</span>,
294 }); 292 });
295 }, 293 }
296 render() { 294 render() {
297 <span class="hljs-keyword">return</span> ( 295 <span class="hljs-keyword">return</span> (
298 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">div</span>&gt;</span> 296 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">div</span>&gt;</span>
@@ -307,8 +305,8 @@ Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-lic
307 <span class="hljs-tag">&lt;<span class="hljs-title">button</span> <span class="hljs-attribute">onClick</span>=<span class="hljs-value">{this.clear}</span>&gt;</span>clear<span class="hljs-tag">&lt;/<span class="hljs-title">button</span>&gt;</span> 305 <span class="hljs-tag">&lt;<span class="hljs-title">button</span> <span class="hljs-attribute">onClick</span>=<span class="hljs-value">{this.clear}</span>&gt;</span>clear<span class="hljs-tag">&lt;/<span class="hljs-title">button</span>&gt;</span>
308 <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span> 306 <span class="hljs-tag">&lt;/<span class="hljs-title">div</span>&gt;</span>
309 )</span>; 307 )</span>;
310 }, 308 }
311}); 309}
312 310
313ReactDom.render( 311ReactDom.render(
314 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">App</span> /&gt;</span>, 312 <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-title">App</span> /&gt;</span>,