MCPcopy Create free account
hub / github.com/flyfloor/react-component / TimeInputDemo

Class TimeInputDemo

demo/example/TimeInputDemo.jsx:4–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2import {TimeInput} from './index.js';
3
4export default class TimeInputDemo extends React.Component {
5 constructor(props){
6 super(props);
7 this.state = {
8 showTime: '13:12:31'
9 };
10 }
11
12 handleTimeChange(value){
13 this.setState({
14 showTime: value
15 });
16 }
17
18 render() {
19 return (
20 <div>
21 <h3>Time input</h3>
22 <ul>
23 <li>
24 <h4>Default time input</h4>
25 <TimeInput/>
26 <pre>
27 <code>
28 {`<TimeInput/>`}
29 </code>
30 </pre>
31 </li>
32 <li>
33 <h4>Time input with given value</h4>
34 <TimeInput value="12:44:23"/>
35 <pre>
36 <code>
37 {`<TimeInput value="12:44:23"/>`}
38 </code>
39 </pre>
40 </li>
41 <li>
42 <h4>Time input with limit range</h4>
43 <TimeInput value="11:21:08" begin="8:30" end="16:45:08"/>
44 <pre>
45 <code>
46 {`<TimeInput value="11:21:08" begin="8:30" end="16:45:08"/>`}
47 </code>
48 </pre>
49 </li>
50 <li>
51 <h4>Time input onchange event</h4>
52 <p>time you selected is {this.state.showTime}</p>
53 <TimeInput onChange={this.handleTimeChange.bind(this)} value={this.state.showTime}/>
54 <pre>
55 <code>
56 {`<TimeInput onChange={handleTimeChange} value={value}/>`}
57 </code>
58 </pre>
59 </li>
60 <li>
61 <h4>simple</h4>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…