|
1 | 1 | // import moment from 'moment' |
2 | 2 | import React, {PropTypes, Component} from 'react' |
3 | | -import { Form, FormGroup, FormControl, Grid, Row, Col } from 'react-bootstrap' |
| 3 | +import { Form, FormGroup, FormControl, Row, Col } from 'react-bootstrap' |
4 | 4 | // import { SingleDatePicker } from 'react-dates' |
5 | 5 | import { connect } from 'react-redux' |
6 | 6 |
|
7 | 7 | import { setDepart, setDate, setTime } from '../../actions/form' |
8 | 8 |
|
9 | 9 | class DateTimeSelector extends Component { |
10 | 10 | static propTypes = { |
| 11 | + date: PropTypes.string, |
| 12 | + departArrive: PropTypes.string, |
| 13 | + time: PropTypes.string, |
11 | 14 | location: PropTypes.object, |
12 | 15 | label: PropTypes.string, |
| 16 | + setDate: PropTypes.func, |
| 17 | + setDepart: PropTypes.func, |
13 | 18 | setLocation: PropTypes.func, |
| 19 | + setTime: PropTypes.func, |
14 | 20 | type: PropTypes.string // replace with locationType? |
15 | 21 | } |
16 | 22 | constructor (props) { |
@@ -40,16 +46,16 @@ class DateTimeSelector extends Component { |
40 | 46 | <FormGroup style={{marginBottom: '15px'}} className='date-time-selector'> |
41 | 47 | <Row> |
42 | 48 | <Col xs={6}> |
43 | | - <FormControl |
44 | | - componentClass='select' |
45 | | - value={departArrive} |
46 | | - onChange={this._onDepartChange} |
47 | | - style={{width: '100%'}} |
48 | | - > |
49 | | - {options.map((o, i) => ( |
50 | | - <option key={i} value={o}>{o}</option> |
51 | | - ))} |
52 | | - </FormControl> |
| 49 | + <FormControl |
| 50 | + componentClass='select' |
| 51 | + value={departArrive} |
| 52 | + onChange={this._onDepartChange} |
| 53 | + style={{width: '100%'}} |
| 54 | + > |
| 55 | + {options.map((o, i) => ( |
| 56 | + <option key={i} value={o}>{o}</option> |
| 57 | + ))} |
| 58 | + </FormControl> |
53 | 59 | </Col> |
54 | 60 | <Col>{ }</Col> |
55 | 61 | </Row> |
|
0 commit comments